
Table 1 generator extended by clinical domain profiles
Source:R/table1_profiles.R
table1_generator.RdBuilds a cohort-level Table 1 from a DuckDB OMOP database. Labs use the last value in the stay by default;
bounds (user bounds, then profile, then DEFAULT_PHYSIOLOGIC_BOUNDS) are applied BEFORE aggregation and
bounds = FALSE disables bounding. Units are harmonized first (harmonize_measurement_units()). The cohort
table needs subject_id, cohort_start_date, cohort_end_date. Mirror of Python Table1Generator.
Usage
table1_generator(
db_path = NULL,
con = NULL,
read_only = TRUE,
bounds = NULL,
population = "adult",
harmonize_units = TRUE
)Arguments
- db_path
Path to a DuckDB file (opened read-only), or give
con.- con
An existing DuckDB DBI connection.
- read_only
Open
db_pathread-only (default).- bounds
NULL(defaults), a named list of overrides, orFALSE.- population
"adult","pediatric", or"neonatal"(default"adult").- harmonize_units
Run the unit preflight first (default
TRUE).