Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document select method #668

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

** Bugfixes

* support for tidyverse select method for polar volume and polar scan objects (#668,#460)

* Updated the default refractive index value used in conversion of linear reflectivity (eta) to logarithmic reflectivity (dBZ) (#642). The effect is a 7% increase in animal densities in output of functions `integrate_to_ppi()` and `read_cajun()` only.

# bioRad 0.7.3
Expand Down
19 changes: 19 additions & 0 deletions R/select.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
#' Tidyverse methods for bioRad objects
#'
#' Tidyverse methods for bioRad objects, currently only select is implemented. When \code{dplyr} or \code{tidyverse} is loaded the \code{select} method can be used to select parameters.
#' @param .data data object of class \code{scan} or \code{pvol}
#' @param ... other arguments
#' @name tidyverse
#' @examples
#' if (require(dplyr, quietly = TRUE)) {
#' # locate example volume file:
#' pvolfile <- system.file("extdata", "volume.h5", package = "bioRad")
#'
#' # load the file:
#' example_pvol <- read_pvolfile(pvolfile)
#' pvol_selected<-select(example_pvol, DBZH, ZDR)
#' # Only selected parameters are retained in the pvol
#' get_scan(pvol_selected, 1.5)
#' # Also a series of parameters in a scan can be selected
#' select(get_scan(example_pvol, 2.5), VRADH:ZDR)
#' }
# generalizations for the dplyr verb `select` to `scan` and `pvol` objects
select.scan <- function(.data, ...) {
if (!requireNamespace("dplyr", quietly = TRUE)) {
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ reference:
- integrate_to_ppi
- calculate_param
- apply_mistnet
- tidyverse
- Math.scan
- title: "Plotting radar scans"
desc: "Functions to plot a polar volume (pvol), scan (scan) or parameter (param) on a grid or basemap as a plan position indicator (ppi)."
Expand Down
31 changes: 31 additions & 0 deletions man/tidyverse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading