Skip to content

Commit

Permalink
styler
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Oct 15, 2024
1 parent b536e82 commit 4598ffe
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 26 deletions.
8 changes: 6 additions & 2 deletions R/import-standalone-purrr.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,19 @@ 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
}
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
}
Expand Down
20 changes: 10 additions & 10 deletions R/reexports-epidatasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
2 changes: 1 addition & 1 deletion man/archive_cases_dv_subset_all_states.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/can_prov_cases.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/case_death_rate_archive.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/counts_subset.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/county_smoothed_cli_comparison.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/covid_case_death_rates.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/ctis_covid_behaviours.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/grad_employ_subset.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/state_census.Rd

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

5 changes: 3 additions & 2 deletions vignettes/articles/sliding.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
```

</details>
Expand Down
2 changes: 1 addition & 1 deletion vignettes/articles/symptom-surveys.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions vignettes/preprocessing-and-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 %>%
Expand Down

0 comments on commit 4598ffe

Please sign in to comment.