Summarise counts for each different cohort. You can add a list of stratifications.
Source:R/summariseCharacteristics.R
summariseCohortCounts.Rd
`r lifecycle::badge("deprecated")`
Usage
summariseCohortCounts(cohort, strata = list())
Examples
# \donttest{
cdm <- mockPatientProfiles()
cdm$cohort1 |>
addSex() |>
summariseCohortCounts(strata = "sex")
#> Warning: `summariseCohortCounts()` was deprecated in PatientProfiles 0.8.0.
#> ℹ Please use `CohortCharacteristics::summariseCohortCounts()` instead.
#> ℹ summarising data
#> ℹ The following estimates will be computed:
#> → Start summary of data, at 2024-05-11 12:04:16.109194
#> ✔ Summary finished, at 2024-05-11 12:04:16.621273
#> ✔ summariseCharacteristics finished!
#> # A tibble: 4 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 PP_MOCK cohort_name cohort_1 overall overall
#> 2 1 PP_MOCK cohort_name cohort_1 overall overall
#> 3 1 PP_MOCK cohort_name cohort_1 sex Female
#> 4 1 PP_MOCK cohort_name cohort_1 sex Female
#> # ℹ 7 more variables: variable_name <chr>, variable_level <chr>,
#> # estimate_name <chr>, estimate_type <chr>, estimate_value <chr>,
#> # additional_name <chr>, additional_level <chr>
# }