cohortGapEra {DrugUtilisation} | R Documentation |
Get the gapEra used to create a cohort
Description
Get the gapEra used to create a cohort
Usage
cohortGapEra(cohort, cohortId = NULL)
Arguments
cohort |
A |
cohortId |
Integer vector refering to cohortIds from cohort. If NULL all cohort definition ids in settings will be used. |
Value
gapEra values for the specific cohortIds
Examples
library(CDMConnector)
library(DrugUtilisation)
library(dplyr)
cdm <- mockDrugUtilisation()
druglist <- CodelistGenerator::getDrugIngredientCodes(
cdm, c("acetaminophen", "metformin")
)
cdm <- generateDrugUtilisationCohortSet(
cdm = cdm,
name = "drug_cohorts",
conceptSet = druglist,
gapEra = 100
)
cohortGapEra(cdm$drug_cohorts)
[Package DrugUtilisation version 0.7.0 Index]