Format a summarised_characteristics object into a visual table.
Source:R/gtResult.R
formatCharacteristics.Rd
`r lifecycle::badge("deprecated")`
Arguments
- result
A summarised_characteristics object.
- type
Type of desired formatted table, possibilities: "gt", "flextable", "tibble".
- splitStrata
Whether or not to split the strata, default is True.
- format
The columns that the user wishes to see for the formatted table.
- cdmName
Whether or not to display the cdm name, default is TRUE.
- cohortName
Weather or not to display the cohort name, default is TRUE.
- style
The style of the table output.
- minCellCount
Default is 5, meaning results that are more than 0 but less than 5 will not be reported.
- .options
See optionsTableCharacteristics() for default values.
Examples
# \donttest{
library(PatientProfiles)
cdm <- mockPatientProfiles()
cdm$cohort1 |>
summariseCharacteristics()
#> Warning: `summariseCharacteristics()` was deprecated in PatientProfiles 0.8.0.
#> ℹ Please use `CohortCharacteristics::summariseCharacteristics()` instead.
#> ℹ adding demographics columns
#> ℹ summarising data
#> ℹ The following estimates will be computed:
#> • variable_00002: count, percentage
#> • cohort_start_date: min, q05, q25, median, q75, q95, max
#> • cohort_end_date: min, q05, q25, median, q75, q95, max
#> • variable_00004: min, q05, q25, median, q75, q95, max, mean, sd
#> • variable_00005: min, q05, q25, median, q75, q95, max, mean, sd
#> • variable_00003: 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:03:23.7403
#> ✔ Summary finished, at 2024-05-11 12:03:23.853025
#> ✔ summariseCharacteristics finished!
#> # A tibble: 45 × 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 overall overall
#> 4 1 PP_MOCK cohort_name cohort_1 overall overall
#> 5 1 PP_MOCK cohort_name cohort_1 overall overall
#> 6 1 PP_MOCK cohort_name cohort_1 overall overall
#> 7 1 PP_MOCK cohort_name cohort_1 overall overall
#> 8 1 PP_MOCK cohort_name cohort_1 overall overall
#> 9 1 PP_MOCK cohort_name cohort_1 overall overall
#> 10 1 PP_MOCK cohort_name cohort_1 overall overall
#> # ℹ 35 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)
# }