Skip to contents

`r lifecycle::badge("deprecated")`

Usage

summariseCohortCounts(cohort, strata = list())

Arguments

cohort

A cohort in the cdm.

strata

Stratification list.

Value

A summary of the number of individuals in each cohort and strata.

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>
# }