From d16f6081fbd41a110037b7c0e3ff24b765e164aa Mon Sep 17 00:00:00 2001 From: "Daniel J. McDonald" Date: Mon, 11 Nov 2024 12:08:18 -0800 Subject: [PATCH] dataset renamed --- R/layer_population_scaling.R | 2 +- R/step_population_scaling.R | 2 +- man/layer_population_scaling.Rd | 2 +- man/step_population_scaling.Rd | 2 +- tests/testthat/_snaps/arg_is_.md | 2 +- tests/testthat/test-arg_is_.R | 2 +- tests/testthat/test-check-training-set.R | 2 +- tests/testthat/test-population_scaling.R | 2 +- tests/testthat/test-snapshots.R | 2 +- tests/testthat/test-target_date_bug.R | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/R/layer_population_scaling.R b/R/layer_population_scaling.R index 9275d910c..4755083ce 100644 --- a/R/layer_population_scaling.R +++ b/R/layer_population_scaling.R @@ -48,7 +48,7 @@ #' @export #' @examples #' library(dplyr) -#' jhu <- jhu_csse_daily_subset %>% +#' jhu <- cases_deaths_subset %>% #' filter(time_value > "2021-11-01", geo_value %in% c("ca", "ny")) %>% #' select(geo_value, time_value, cases) #' diff --git a/R/step_population_scaling.R b/R/step_population_scaling.R index 4e4d3aa26..4515920b2 100644 --- a/R/step_population_scaling.R +++ b/R/step_population_scaling.R @@ -45,7 +45,7 @@ #' @export #' @examples #' library(dplyr) -#' jhu <- jhu_csse_daily_subset %>% +#' jhu <- cases_deaths_subset %>% #' filter(time_value > "2021-11-01", geo_value %in% c("ca", "ny")) %>% #' select(geo_value, time_value, cases) #' diff --git a/man/layer_population_scaling.Rd b/man/layer_population_scaling.Rd index 5a105f208..253116694 100644 --- a/man/layer_population_scaling.Rd +++ b/man/layer_population_scaling.Rd @@ -75,7 +75,7 @@ argument is a common \emph{divisor} of the selected variables. } \examples{ library(dplyr) -jhu <- jhu_csse_daily_subset \%>\% +jhu <- cases_deaths_subset \%>\% filter(time_value > "2021-11-01", geo_value \%in\% c("ca", "ny")) \%>\% select(geo_value, time_value, cases) diff --git a/man/step_population_scaling.Rd b/man/step_population_scaling.Rd index 294f27f61..004c2c823 100644 --- a/man/step_population_scaling.Rd +++ b/man/step_population_scaling.Rd @@ -88,7 +88,7 @@ argument is a common \emph{multiplier} of the selected variables. } \examples{ library(dplyr) -jhu <- jhu_csse_daily_subset \%>\% +jhu <- cases_deaths_subset \%>\% filter(time_value > "2021-11-01", geo_value \%in\% c("ca", "ny")) \%>\% select(geo_value, time_value, cases) diff --git a/tests/testthat/_snaps/arg_is_.md b/tests/testthat/_snaps/arg_is_.md index fcb823f2a..f05ca780d 100644 --- a/tests/testthat/_snaps/arg_is_.md +++ b/tests/testthat/_snaps/arg_is_.md @@ -377,7 +377,7 @@ # simple surface step test Code - epi_recipe(jhu_csse_daily_subset) %>% step_epi_lag(death_rate, lag = "hello") + epi_recipe(cases_deaths_subset) %>% step_epi_lag(death_rate, lag = "hello") Condition Error in `step_epi_lag()`: ! `lag` must be a non-negative integer. diff --git a/tests/testthat/test-arg_is_.R b/tests/testthat/test-arg_is_.R index 89c2c936f..b7a0b7644 100644 --- a/tests/testthat/test-arg_is_.R +++ b/tests/testthat/test-arg_is_.R @@ -149,6 +149,6 @@ test_that("coerce scalar to date", { test_that("simple surface step test", { expect_snapshot( error = TRUE, - epi_recipe(jhu_csse_daily_subset) %>% step_epi_lag(death_rate, lag = "hello") + epi_recipe(cases_deaths_subset) %>% step_epi_lag(death_rate, lag = "hello") ) }) diff --git a/tests/testthat/test-check-training-set.R b/tests/testthat/test-check-training-set.R index 64d4d6945..ad891dd45 100644 --- a/tests/testthat/test-check-training-set.R +++ b/tests/testthat/test-check-training-set.R @@ -1,5 +1,5 @@ test_that("training set validation works", { - template <- jhu_csse_daily_subset[1, ] + template <- cases_deaths_subset[1, ] rec <- list(template = template) t1 <- template diff --git a/tests/testthat/test-population_scaling.R b/tests/testthat/test-population_scaling.R index 6337a2ea8..a40e6a94d 100644 --- a/tests/testthat/test-population_scaling.R +++ b/tests/testthat/test-population_scaling.R @@ -90,7 +90,7 @@ test_that("Number of columns and column names returned correctly, Upper and lowe ## Postprocessing test_that("Postprocessing workflow works and values correct", { - jhu <- jhu_csse_daily_subset %>% + jhu <- cases_deaths_subset %>% dplyr::filter(time_value > "2021-11-01", geo_value %in% c("ca", "ny")) %>% dplyr::select(geo_value, time_value, cases) diff --git a/tests/testthat/test-snapshots.R b/tests/testthat/test-snapshots.R index d624a4c21..83fc5322a 100644 --- a/tests/testthat/test-snapshots.R +++ b/tests/testthat/test-snapshots.R @@ -1,4 +1,4 @@ -train_data <- jhu_csse_daily_subset +train_data <- cases_deaths_subset expect_snapshot_tibble <- function(x) { expect_snapshot_value(x, style = "deparse", cran = FALSE) } diff --git a/tests/testthat/test-target_date_bug.R b/tests/testthat/test-target_date_bug.R index 4a7e7d2e8..02a825267 100644 --- a/tests/testthat/test-target_date_bug.R +++ b/tests/testthat/test-target_date_bug.R @@ -2,7 +2,7 @@ # https://github.com/cmu-delphi/epipredict/issues/290 library(dplyr) -train <- jhu_csse_daily_subset |> +train <- cases_deaths_subset |> filter(time_value >= as.Date("2021-10-01")) |> select(geo_value, time_value, cr = case_rate_7d_av, dr = death_rate_7d_av) ngeos <- n_distinct(train$geo_value)