From 2d8f27dc6d6b1bff59f210c6c6e25d3535b62a70 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Wed, 17 Sep 2025 19:56:45 -0400 Subject: [PATCH 1/5] Qualify namespace for `epidatasets::state_census` --- R/flusight_hub_formatter.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/flusight_hub_formatter.R b/R/flusight_hub_formatter.R index 3deba254..b8b7133d 100644 --- a/R/flusight_hub_formatter.R +++ b/R/flusight_hub_formatter.R @@ -1,6 +1,6 @@ location_to_abbr <- function(location) { dictionary <- - state_census %>% + epidatasets::state_census %>% dplyr::transmute( location = dplyr::case_match(fips, "00" ~ "US", .default = fips), abbr @@ -10,7 +10,7 @@ location_to_abbr <- function(location) { abbr_to_location <- function(abbr) { dictionary <- - state_census %>% + epidatasets::state_census %>% dplyr::transmute( location = dplyr::case_match(fips, "00" ~ "US", .default = fips), abbr @@ -62,7 +62,7 @@ abbr_to_location <- function(abbr) { #' geo_value %in% c("ca", "ny", "dc", "ga", "vt") #' ) %>% #' select(geo_value, time_value, death_rate) %>% -#' left_join(state_census %>% select(pop, abbr), by = c("geo_value" = "abbr")) %>% +#' left_join(epidatasets::state_census %>% select(pop, abbr), by = c("geo_value" = "abbr")) %>% #' mutate(deaths = pmax(death_rate / 1e5 * pop * 7, 0)) %>% #' select(-pop, -death_rate) %>% #' group_by(geo_value) %>% From 31ff9c7d28d755b373955778cc98f19c4bfc0deb Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Wed, 17 Sep 2025 20:25:42 -0400 Subject: [PATCH 2/5] Do not qualify namespace in example, run roxygen --- R/flusight_hub_formatter.R | 2 +- man/autoplot-epipred.Rd | 2 +- man/step_adjust_latency.Rd | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/R/flusight_hub_formatter.R b/R/flusight_hub_formatter.R index b8b7133d..4b12c94d 100644 --- a/R/flusight_hub_formatter.R +++ b/R/flusight_hub_formatter.R @@ -62,7 +62,7 @@ abbr_to_location <- function(abbr) { #' geo_value %in% c("ca", "ny", "dc", "ga", "vt") #' ) %>% #' select(geo_value, time_value, death_rate) %>% -#' left_join(epidatasets::state_census %>% select(pop, abbr), by = c("geo_value" = "abbr")) %>% +#' left_join(state_census %>% select(pop, abbr), by = c("geo_value" = "abbr")) %>% #' mutate(deaths = pmax(death_rate / 1e5 * pop * 7, 0)) %>% #' select(-pop, -death_rate) %>% #' group_by(geo_value) %>% diff --git a/man/autoplot-epipred.Rd b/man/autoplot-epipred.Rd index 03cba3e2..2de338e1 100644 --- a/man/autoplot-epipred.Rd +++ b/man/autoplot-epipred.Rd @@ -75,7 +75,7 @@ this color.} \item{.facet_filter}{Select which facets will be displayed. Especially useful for when there are many \code{geo_value}'s or keys. This is a -<\code{\link[=args_data_masking]{rlang}}> expression along the lines of \code{\link[dplyr:filter]{dplyr::filter()}}. +<\code{\link[rlang:args_data_masking]{rlang}}> expression along the lines of \code{\link[dplyr:filter]{dplyr::filter()}}. However, it must be a single expression combined with the \code{&} operator. This contrasts to the typical use case which allows multiple comma-separated expressions which are implicitly combined with \code{&}. When multiple variables are selected diff --git a/man/step_adjust_latency.Rd b/man/step_adjust_latency.Rd index 01943440..d0d6c3ef 100644 --- a/man/step_adjust_latency.Rd +++ b/man/step_adjust_latency.Rd @@ -17,11 +17,11 @@ step_adjust_latency( ) } \arguments{ -\item{recipe}{A recipe object. The step will be added to the -sequence of operations for this recipe.} +\item{recipe}{A recipe object. The step will be added to the sequence of +operations for this recipe.} -\item{...}{One or more selector functions to choose variables -for this step. See \code{\link[recipes:selections]{selections()}} for more details.} +\item{...}{One or more selector functions to choose variables for this step. +See \code{\link[recipes:selections]{selections()}} for more details.} \item{method}{a character. Determines the method by which the forecast handles latency. The options are: From 06396678e88e9b4304e9c4a2bc52d9620b92123b Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Wed, 17 Sep 2025 20:41:28 -0400 Subject: [PATCH 3/5] Increment version number to 0.2.1 --- DESCRIPTION | 2 +- NEWS.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1d04a3b2..ae08a35c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: epipredict Title: Basic epidemiology forecasting methods -Version: 0.2.0 +Version: 0.2.1 Authors@R: c( person("Daniel J.", "McDonald", , "daniel@stat.ubc.ca", role = c("aut", "cre")), person("Ryan", "Tibshirani", , "ryantibs@cmu.edu", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 814bfb67..b2677165 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# epipredict 0.2.1 + # epipredict (development) Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicate PR's. From 9477c2733931a6e8cc50318cd3befe07e0e489a4 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Wed, 17 Sep 2025 20:43:44 -0400 Subject: [PATCH 4/5] Add to NEWS.md --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index b2677165..5ce72097 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # epipredict 0.2.1 +- Fix bug in `flusight_hub_formatter()` so that it works as expected even if the user has not first loaded the `epidatasets` package. + # epipredict (development) Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicate PR's. From cb8fcdefb0f5a2ab1cf58f373bab49ec333c1efe Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Wed, 17 Sep 2025 20:45:34 -0400 Subject: [PATCH 5/5] Reorder NEWS.md --- NEWS.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 5ce72097..c851711c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,11 @@ -# epipredict 0.2.1 - -- Fix bug in `flusight_hub_formatter()` so that it works as expected even if the user has not first loaded the `epidatasets` package. - # epipredict (development) Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.0.x will indicate PR's. +# epipredict 0.2.1 + +- Fix bug in `flusight_hub_formatter()` so that it works as expected even if the user has not first loaded the `epidatasets` package. + # epipredict 0.2 ## Breaking changes