-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add small example datasets for use in examples #164
Milestone
Comments
Even better, write a function that does this: library(conmat)
new_polymod_setting_data <- function(
countries = c(
"Belgium",
"Finland",
"Germany",
"Italy",
"Luxembourg",
"Netherlands",
"Poland",
"United Kingdom"
),
age_limit = 20
){
polymod_setting_data <- get_polymod_setting_data(countries = countries)
polymod_setting_data_clipped <- lapply(
polymod_setting_data,
\(x) dplyr::filter(x, age_from <= age_limit, age_to <= age_limit)) |>
new_setting_data()
polymod_setting_data_clipped
}
polymod_30 <- new_polymod_setting_data(age_limit = 30)
summary(polymod_30$home)
#> setting age_from age_to contacts participants
#> Length:961 Min. : 0 Min. : 0 Min. : 0.000 Min. : 72.0
#> Class :character 1st Qu.: 7 1st Qu.: 7 1st Qu.: 2.000 1st Qu.: 86.0
#> Mode :character Median :15 Median :15 Median : 5.000 Median :122.0
#> Mean :15 Mean :15 Mean : 6.984 Mean :116.3
#> 3rd Qu.:23 3rd Qu.:23 3rd Qu.:10.000 3rd Qu.:142.0
#> Max. :30 Max. :30 Max. :54.000 Max. :159.0 Created on 2024-07-02 with reprex v2.1.0
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
E.g.,
Instead of doing
Just have a couple of smaller datasets
See how small I can make it but still be useful?
This way the examples can all run as well
The text was updated successfully, but these errors were encountered: