Skip to content

Commit

Permalink
small documentation edits, fix test list_vpts_aloft
Browse files Browse the repository at this point in the history
  • Loading branch information
adokter committed Sep 13, 2024
1 parent d44c92a commit 31e6d27
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ Suggests:
LazyData: true
Encoding: UTF-8
VignetteBuilder: knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
10 changes: 6 additions & 4 deletions R/calculate_param.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#' vectorized. For example the `base` `ifelse` function is not vectorized,
#' in these cases alternatives can be used (e.g. `dplyr::if_else`).
#'
#' Next some times functions do not operate on a `matrix` or `param` object.
#' One example is the `dplyr::if_else` function, this can be resolved by
#' calling the `c` function on a parameter to convert it to a vector
#' (e.g. `c(DBZH)`).
#' Also note that some functions do not operate on a `matrix` or `param` object.
#' One example is the `dplyr::if_else` function. A workaround is
#' calling the `c()` function on a parameter to convert it to a vector
#' (e.g. `c(DBZH)`, see examples).
#'
#' @seealso
#' * [get_param()]
Expand Down Expand Up @@ -52,6 +52,8 @@
#' calculate_param(example_scan, DR = 10 * log10((ZDR + 1 - 2 * ZDR^0.5 * RHOHV) /
#' (ZDR + 1 + 2 * ZDR^0.5 * RHOHV)))
#'
#' # set all reflectivity values to NA when correlation coefficient > 0.95
#' (indicating precipitation)
#' if (require(dplyr, quietly = TRUE)) {
#' calculate_param(pvol,
#' DBZH=if_else(c(RHOHV)>.95, NA, c(DBZH)) )
Expand Down
2 changes: 1 addition & 1 deletion man/beam_distance.Rd

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

2 changes: 1 addition & 1 deletion man/beam_height.Rd

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

2 changes: 1 addition & 1 deletion man/beam_range.Rd

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

2 changes: 1 addition & 1 deletion man/beam_width.Rd

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

10 changes: 6 additions & 4 deletions man/calculate_param.Rd

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

2 changes: 1 addition & 1 deletion man/gaussian_beam_profile.Rd

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

6 changes: 3 additions & 3 deletions tests/testthat/test-list_vpts_aloft.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ test_that("list_vpts_aloft() warns if data was found for subset of radars or if
)
expect_warning(
list_vpts_aloft(
date_min = "1900-01-01",
date_max = "2023-05-22",
date_min = "2020-01-01",
date_max = "2020-06-01",
radars = c("nobml")
),
"Radar data found between 2023-02 and 2023-05 but not every date has radar data")
"Radar data found between 2020-02 and 2020-06 but not every date has radar data")
})

test_that("list_vpts_aloft() warns and returns emtpy vector on no data found",{
Expand Down

0 comments on commit 31e6d27

Please sign in to comment.