View source: R/summariseRecordCount.R
summariseRecordCount | R Documentation |
Summarise record counts of an omop_table using a specific time interval. Only records that fall within the observation period are considered.
summariseRecordCount(
cdm,
omopTableName,
interval = "overall",
ageGroup = NULL,
sex = FALSE,
sample = NULL,
dateRange = NULL
)
cdm |
A cdm_reference object. |
omopTableName |
A character vector of omop tables from the cdm. |
interval |
Time interval to stratify by. It can either be "years", "quarters", "months" or "overall". |
ageGroup |
A list of age groups to stratify results by. |
sex |
Whether to stratify by sex (TRUE) or not (FALSE). |
sample |
An integer to sample the tables to only that number of records. If NULL no sample is done. |
dateRange |
A vector of two dates defining the desired study period.
Only the |
A summarised_result object.
library(dplyr, warn.conflicts = FALSE)
cdm <- mockOmopSketch()
summarisedResult <- summariseRecordCount(
cdm = cdm,
omopTableName = c("condition_occurrence", "drug_exposure"),
interval = "years",
ageGroup = list("<=20" = c(0, 20), ">20" = c(21, Inf)),
sex = TRUE
)
summarisedResult |>
glimpse()
PatientProfiles::mockDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.