erafyCohort | R Documentation |
Erafy a cohort_table collapsing records separated gapEra days or less.
erafyCohort(
cohort,
gapEra,
cohortId = NULL,
nameStyle = "{cohort_name}_{gap_era}",
name = omopgenerics::tableName(cohort)
)
cohort |
A cohort_table object. |
gapEra |
Number of days between two continuous exposures to be considered in the same era. |
cohortId |
A cohort definition id to restrict by. If NULL, all cohorts will be included. |
nameStyle |
String to create the new names of cohorts. Must contain '{cohort_name}' if more than one cohort is present and '{gap_era}' if more than one gapEra is provided. |
name |
Name of the new cohort table, it must be a length 1 character vector. |
A cohort_table object.
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
cdm$cohort2 <- cdm$cohort1 |>
erafyCohort(gapEra = 30, name = "cohort2")
cdm$cohort2
settings(cdm$cohort2)
mockDisconnect(cdm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.