Summarise the characteristics of the base population of a cdm_reference object.
Source:R/summarisePopulationCharacteristics.R
summarisePopulationCharacteristics.Rd
Summarise the characteristics of the base population of a cdm_reference object.
Usage
summarisePopulationCharacteristics(
cdm,
studyPeriod = c(NA, NA),
sex = FALSE,
ageGroup = NULL
)
Examples
# \donttest{
cdm <- mockOmopSketch()
summarisedPopulation <- summarisePopulationCharacteristics(
cdm = cdm,
studyPeriod = c("2010-01-01", NA),
sex = TRUE,
ageGroup = NULL
)
#> ! cohort columns will be reordered to match the expected order:
#> cohort_definition_id, subject_id, cohort_start_date, and cohort_end_date.
#> ℹ Building new trimmed cohort
#> Creating initial cohort
#> ✔ Cohort trimmed
#> ℹ adding demographics columns
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> ! The following column type were changed:
#> • variable_name: from integer to character
summarisedPopulation |> print()
#> # A tibble: 122 × 13
#> result_id cdm_name group_name group_level strata_name strata_level
#> <int> <chr> <chr> <chr> <chr> <chr>
#> 1 1 mockOmopSketch cohort_name demographics overall overall
#> 2 1 mockOmopSketch cohort_name demographics sex Female
#> 3 1 mockOmopSketch cohort_name demographics sex Male
#> 4 1 mockOmopSketch cohort_name demographics overall overall
#> 5 1 mockOmopSketch cohort_name demographics sex Female
#> 6 1 mockOmopSketch cohort_name demographics sex Male
#> 7 1 mockOmopSketch cohort_name demographics overall overall
#> 8 1 mockOmopSketch cohort_name demographics overall overall
#> 9 1 mockOmopSketch cohort_name demographics overall overall
#> 10 1 mockOmopSketch cohort_name demographics overall overall
#> # ℹ 112 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>
PatientProfiles::mockDisconnect(cdm = cdm)
# }