View source: R/summariseRecordCount.R
| summariseRecordCount | R Documentation |
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 |
omopTableName |
A character vector of the names of the tables to
summarise in the cdm object. Run |
interval |
Time interval to stratify by. It can either be "years", "quarters", "months" or "overall". |
ageGroup |
A list of age groups to stratify the results by. Each element
represents a specific age range. You can give them specific names, e.g.
|
sex |
Logical; whether to stratify results by sex ( |
sample |
Either an integer or a character string.
|
dateRange |
A vector of two dates defining the desired study period.
Only the |
A summarised_result object with the results.
library(OmopSketch)
library(dplyr, warn.conflicts = FALSE)
library(omock)
cdm <- mockCdmFromDataset(datasetName = "GiBleed", source = "duckdb")
result <- summariseRecordCount(
cdm = cdm,
omopTableName = c("condition_occurrence", "drug_exposure"),
interval = "years",
ageGroup = list("<=20" = c(0, 20), ">20" = c(21, Inf)),
sex = TRUE
)
tableRecordCount(result = result)
cdmDisconnect(cdm = cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.