diff --git a/R/import-standalone-purrr.R b/R/import-standalone-purrr.R index 623142a0..4ec36e12 100644 --- a/R/import-standalone-purrr.R +++ b/R/import-standalone-purrr.R @@ -169,7 +169,9 @@ every <- function(.x, .p, ...) { .p <- as_function(.p, env = global_env()) for (i in seq_along(.x)) { - if (!rlang::is_true(.p(.x[[i]], ...))) return(FALSE) + if (!rlang::is_true(.p(.x[[i]], ...))) { + return(FALSE) + } } TRUE } @@ -177,7 +179,9 @@ some <- function(.x, .p, ...) { .p <- as_function(.p, env = global_env()) for (i in seq_along(.x)) { - if (rlang::is_true(.p(.x[[i]], ...))) return(TRUE) + if (rlang::is_true(.p(.x[[i]], ...))) { + return(TRUE) + } } FALSE } diff --git a/R/reexports-epidatasets.R b/R/reexports-epidatasets.R index b3618c9d..30e3e41a 100644 --- a/R/reexports-epidatasets.R +++ b/R/reexports-epidatasets.R @@ -13,7 +13,7 @@ #' #' # fails #' \dontrun{ -#' data(grad_employ_subset, package = "epipredict") +#' data(grad_employ_subset, package = "epipredict") #' } #' @export delayedAssign("grad_employ_subset", epidatasets::grad_employ_subset) @@ -33,7 +33,7 @@ delayedAssign("grad_employ_subset", epidatasets::grad_employ_subset) #' #' # fails #' \dontrun{ -#' data(covid_case_death_rates, package = "epipredict") +#' data(covid_case_death_rates, package = "epipredict") #' } #' @export delayedAssign("covid_case_death_rates", epidatasets::covid_case_death_rates) @@ -53,7 +53,7 @@ delayedAssign("covid_case_death_rates", epidatasets::covid_case_death_rates) #' #' # fails #' \dontrun{ -#' data(state_census, package = "epipredict") +#' data(state_census, package = "epipredict") #' } #' @export delayedAssign("state_census", epidatasets::state_census) @@ -73,7 +73,7 @@ delayedAssign("state_census", epidatasets::state_census) #' #' # fails #' \dontrun{ -#' data(counts_subset, package = "epipredict") +#' data(counts_subset, package = "epipredict") #' } #' @export delayedAssign("counts_subset", epidatasets::counts_subset) @@ -93,7 +93,7 @@ delayedAssign("counts_subset", epidatasets::counts_subset) #' #' # fails #' \dontrun{ -#' data(ctis_covid_behaviours, package = "epipredict") +#' data(ctis_covid_behaviours, package = "epipredict") #' } #' @export delayedAssign("ctis_covid_behaviours", epidatasets::ctis_covid_behaviours) @@ -113,7 +113,7 @@ delayedAssign("ctis_covid_behaviours", epidatasets::ctis_covid_behaviours) #' #' # fails #' \dontrun{ -#' data(county_smoothed_cli_comparison, package = "epipredict") +#' data(county_smoothed_cli_comparison, package = "epipredict") #' } #' @export delayedAssign("county_smoothed_cli_comparison", epidatasets::county_smoothed_cli_comparison) @@ -133,7 +133,7 @@ delayedAssign("county_smoothed_cli_comparison", epidatasets::county_smoothed_cli #' #' # fails #' \dontrun{ -#' data(cases_deaths_subset, package = "epipredict") +#' data(cases_deaths_subset, package = "epipredict") #' } #' @export delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset) @@ -153,7 +153,7 @@ delayedAssign("cases_deaths_subset", epidatasets::cases_deaths_subset) #' #' # fails #' \dontrun{ -#' data(case_death_rate_archive, package = "epipredict") +#' data(case_death_rate_archive, package = "epipredict") #' } #' @export delayedAssign("case_death_rate_archive", epidatasets::case_death_rate_archive) @@ -173,7 +173,7 @@ delayedAssign("case_death_rate_archive", epidatasets::case_death_rate_archive) #' #' # fails #' \dontrun{ -#' data(archive_cases_dv_subset_all_states, package = "epipredict") +#' data(archive_cases_dv_subset_all_states, package = "epipredict") #' } #' @export delayedAssign("archive_cases_dv_subset_all_states", epidatasets::archive_cases_dv_subset_all_states) @@ -193,7 +193,7 @@ delayedAssign("archive_cases_dv_subset_all_states", epidatasets::archive_cases_d #' #' # fails #' \dontrun{ -#' data(can_prov_cases, package = "epipredict") +#' data(can_prov_cases, package = "epipredict") #' } #' @export delayedAssign("can_prov_cases", epidatasets::can_prov_cases) diff --git a/man/archive_cases_dv_subset_all_states.Rd b/man/archive_cases_dv_subset_all_states.Rd index 425131ff..78c7f387 100644 --- a/man/archive_cases_dv_subset_all_states.Rd +++ b/man/archive_cases_dv_subset_all_states.Rd @@ -61,7 +61,7 @@ archive_cases_dv_subset_all_states # fails \dontrun{ - data(archive_cases_dv_subset_all_states, package = "epipredict") +data(archive_cases_dv_subset_all_states, package = "epipredict") } } \keyword{datasets} diff --git a/man/can_prov_cases.Rd b/man/can_prov_cases.Rd index 75be3a80..8499448b 100644 --- a/man/can_prov_cases.Rd +++ b/man/can_prov_cases.Rd @@ -70,7 +70,7 @@ can_prov_cases # fails \dontrun{ - data(can_prov_cases, package = "epipredict") +data(can_prov_cases, package = "epipredict") } } \keyword{datasets} diff --git a/man/case_death_rate_archive.Rd b/man/case_death_rate_archive.Rd index ec39c275..6af5632c 100644 --- a/man/case_death_rate_archive.Rd +++ b/man/case_death_rate_archive.Rd @@ -62,7 +62,7 @@ case_death_rate_archive # fails \dontrun{ - data(case_death_rate_archive, package = "epipredict") +data(case_death_rate_archive, package = "epipredict") } } \keyword{datasets} diff --git a/man/counts_subset.Rd b/man/counts_subset.Rd index 5d7be693..5ac95664 100644 --- a/man/counts_subset.Rd +++ b/man/counts_subset.Rd @@ -62,7 +62,7 @@ counts_subset # fails \dontrun{ - data(counts_subset, package = "epipredict") +data(counts_subset, package = "epipredict") } } \keyword{datasets} diff --git a/man/county_smoothed_cli_comparison.Rd b/man/county_smoothed_cli_comparison.Rd index 6be83a59..64c00433 100644 --- a/man/county_smoothed_cli_comparison.Rd +++ b/man/county_smoothed_cli_comparison.Rd @@ -103,7 +103,7 @@ county_smoothed_cli_comparison # fails \dontrun{ - data(county_smoothed_cli_comparison, package = "epipredict") +data(county_smoothed_cli_comparison, package = "epipredict") } } \keyword{datasets} diff --git a/man/covid_case_death_rates.Rd b/man/covid_case_death_rates.Rd index e1b6e6bd..19d0da2e 100644 --- a/man/covid_case_death_rates.Rd +++ b/man/covid_case_death_rates.Rd @@ -67,7 +67,7 @@ covid_case_death_rates # fails \dontrun{ - data(covid_case_death_rates, package = "epipredict") +data(covid_case_death_rates, package = "epipredict") } } \keyword{datasets} diff --git a/man/ctis_covid_behaviours.Rd b/man/ctis_covid_behaviours.Rd index 9bf38b64..35ae10d8 100644 --- a/man/ctis_covid_behaviours.Rd +++ b/man/ctis_covid_behaviours.Rd @@ -64,7 +64,7 @@ ctis_covid_behaviours # fails \dontrun{ - data(ctis_covid_behaviours, package = "epipredict") +data(ctis_covid_behaviours, package = "epipredict") } } \keyword{datasets} diff --git a/man/grad_employ_subset.Rd b/man/grad_employ_subset.Rd index 72ddc793..e87c760d 100644 --- a/man/grad_employ_subset.Rd +++ b/man/grad_employ_subset.Rd @@ -67,7 +67,7 @@ grad_employ_subset # fails \dontrun{ - data(grad_employ_subset, package = "epipredict") +data(grad_employ_subset, package = "epipredict") } } \keyword{datasets} diff --git a/man/state_census.Rd b/man/state_census.Rd index 91240d0e..e1121268 100644 --- a/man/state_census.Rd +++ b/man/state_census.Rd @@ -53,7 +53,7 @@ state_census # fails \dontrun{ - data(state_census, package = "epipredict") +data(state_census, package = "epipredict") } } \keyword{datasets} diff --git a/vignettes/articles/sliding.Rmd b/vignettes/articles/sliding.Rmd index ef5659ad..2f2c51c2 100644 --- a/vignettes/articles/sliding.Rmd +++ b/vignettes/articles/sliding.Rmd @@ -96,10 +96,11 @@ case_rate_subset <- pub_covidcast( filter(!(geo_value %in% c("as", "gu", "dc", "mp", "pr", "vi"))) %>% as_epi_archive(compactify = FALSE) -archive_cases_dv_subset_all_states_dt = epix_merge( +archive_cases_dv_subset_all_states_dt <- epix_merge( dv_subset, case_rate_subset, sync = "locf", - compactify = TRUE) + compactify = TRUE +) ``` diff --git a/vignettes/articles/symptom-surveys.Rmd b/vignettes/articles/symptom-surveys.Rmd index 5ca83de5..dffd8b65 100644 --- a/vignettes/articles/symptom-surveys.Rmd +++ b/vignettes/articles/symptom-surveys.Rmd @@ -228,7 +228,7 @@ jhu_7dav_incid <- pub_covidcast( select(geo_value, time_value, value) %>% rename(case = value) -# Find "complete" counties, present in all three data signals, and also +# Find "complete" counties, present in all three data signals, and also # present in the `geo_values_initial` object. geo_values_complete <- intersect( intersect(goog_sm_cli$geo_value, fb_survey$geo_value), diff --git a/vignettes/preprocessing-and-models.Rmd b/vignettes/preprocessing-and-models.Rmd index e38fa7d8..cbe9adf6 100644 --- a/vignettes/preprocessing-and-models.Rmd +++ b/vignettes/preprocessing-and-models.Rmd @@ -284,7 +284,7 @@ behav_ind_mask <- pub_covidcast( time_values = epirange(20210604, 20211231), geo_values = "ca,fl,tx,ny,nj", as_of = d -) %>% +) %>% select(geo_value, time_value, masking = value) behav_ind_distancing <- pub_covidcast( @@ -295,7 +295,7 @@ behav_ind_distancing <- pub_covidcast( time_values = epirange(20210604, 20211231), geo_values = "ca,fl,tx,ny,nj", as_of = d -) %>% +) %>% select(geo_value, time_value, distancing = value) behav_ind <- behav_ind_mask %>%