Summarise counts for cohorts in a cohort table
Source:R/summariseCohortCount.R
summariseCohortCount.Rd
Summarise counts for cohorts in a cohort table
Usage
summariseCohortCount(cohort, cohortId = NULL, strata = list())
Examples
# \donttest{
library(CohortCharacteristics)
library(dplyr, warn.conflicts = FALSE)
cdm <- mockCohortCharacteristics()
summariseCohortCount(cohort = cdm$cohort1) |>
glimpse()
#> ℹ summarising data
#> ✔ summariseCharacteristics finished!
#> Rows: 6
#> Columns: 13
#> $ result_id <int> 1, 1, 1, 1, 1, 1
#> $ cdm_name <chr> "PP_MOCK", "PP_MOCK", "PP_MOCK", "PP_MOCK", "PP_MOCK"…
#> $ group_name <chr> "cohort_name", "cohort_name", "cohort_name", "cohort_…
#> $ group_level <chr> "cohort_1", "cohort_1", "cohort_2", "cohort_2", "coho…
#> $ strata_name <chr> "overall", "overall", "overall", "overall", "overall"…
#> $ strata_level <chr> "overall", "overall", "overall", "overall", "overall"…
#> $ variable_name <chr> "Number records", "Number subjects", "Number records"…
#> $ variable_level <chr> NA, NA, NA, NA, NA, NA
#> $ estimate_name <chr> "count", "count", "count", "count", "count", "count"
#> $ estimate_type <chr> "integer", "integer", "integer", "integer", "integer"…
#> $ estimate_value <chr> "3", "3", "4", "4", "3", "3"
#> $ additional_name <chr> "overall", "overall", "overall", "overall", "overall"…
#> $ additional_level <chr> "overall", "overall", "overall", "overall", "overall"…
mockDisconnect(cdm)
# }