`r lifecycle::badge("deprecated")`
Usage
summariseDemographics(cohort, strata = list(), ageGroup = NULL)
Examples
# \donttest{
library(PatientProfiles)
cdm <- mockPatientProfiles()
summariseDemographics(
cohort = cdm$cohort1,
ageGroup = list(c(0, 19), c(20, 39), c(40, 59), c(60, 79), c(80, 150))
)
#> ℹ adding demographics columns
#> ℹ summarising data
#> ℹ The following estimates will be computed:
#> • variable_00043: count, percentage
#> • variable_00047: count, percentage
#> • cohort_start_date: min, q05, q25, median, q75, q95, max
#> • cohort_end_date: min, q05, q25, median, q75, q95, max
#> • variable_00045: min, q05, q25, median, q75, q95, max, mean, sd
#> • variable_00046: min, q05, q25, median, q75, q95, max, mean, sd
#> • variable_00044: min, q05, q25, median, q75, q95, max, mean, sd
#> ! Table is collected to memory as not all requested estimates are supported on
#> the database side
#> → Start summary of data, at 2024-05-11 12:04:30.765081
#> ✔ Summary finished, at 2024-05-11 12:04:30.880576
#> ✔ summariseCharacteristics finished!
#> # A tibble: 31 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 2 PP_MOCK cohort_name cohort_1 overall overall
#> 2 2 PP_MOCK cohort_name cohort_1 overall overall
#> 3 2 PP_MOCK cohort_name cohort_1 overall overall
#> 4 2 PP_MOCK cohort_name cohort_1 overall overall
#> 5 2 PP_MOCK cohort_name cohort_1 overall overall
#> 6 2 PP_MOCK cohort_name cohort_1 overall overall
#> 7 2 PP_MOCK cohort_name cohort_1 overall overall
#> 8 2 PP_MOCK cohort_name cohort_1 overall overall
#> 9 2 PP_MOCK cohort_name cohort_1 overall overall
#> 10 2 PP_MOCK cohort_name cohort_1 overall overall
#> # ℹ 21 more rows
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
CDMConnector::cdmDisconnect(cdm = cdm)
# }