View source: R/summariseInObservation.R
summariseInObservation | R Documentation |
Summarise the number of people in observation during a specific interval of time.
summariseInObservation(
observationPeriod,
interval = "overall",
output = "record",
ageGroup = NULL,
sex = FALSE,
dateRange = NULL
)
observationPeriod |
An observation_period omop table. It must be part of a cdm_reference object. |
interval |
Time interval to stratify by. It can either be "years", "quarters", "months" or "overall". |
output |
Output format. It can be either the number of records ("record") that are in observation in the specific interval of time, the number of person-days ("person-days"), the number of subjects ("person"), the number of females ("sex") or the median age of population in observation ("age"). |
ageGroup |
A list of age groups to stratify results by. |
sex |
Boolean variable. Whether to stratify by sex (TRUE) or not (FALSE). For output = "sex" this stratification is not applied. |
dateRange |
A vector of two dates defining the desired study period.
Only the |
A summarised_result object.
library(dplyr, warn.conflicts = FALSE)
cdm <- mockOmopSketch()
result <- summariseInObservation(
cdm$observation_period,
interval = "months",
output = c("person-days", "record"),
ageGroup = list("<=60" = c(0, 60), ">60" = c(61, Inf)),
sex = TRUE
)
result |>
glimpse()
PatientProfiles::mockDisconnect(cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.