Learn R Programming

DrugUtilisation (version 1.0.2)

cohortGapEra: Get the gapEra used to create a cohort

Description

Get the gapEra used to create a cohort

Usage

cohortGapEra(cohort, cohortId = NULL)

Value

gapEra values for the specific cohortIds

Arguments

cohort

A cohort_table object.

cohortId

Integer vector refering to cohortIds from cohort. If NULL all cohort definition ids in settings will be used.

Examples

Run this code
# \donttest{
library(DrugUtilisation)
library(CodelistGenerator)

cdm <- mockDrugUtilisation()

druglist <- getDrugIngredientCodes(cdm = cdm,
                                   name = c("acetaminophen", "metformin"))

cdm <- generateDrugUtilisationCohortSet(cdm = cdm,
                                        name = "drug_cohorts",
                                        conceptSet = druglist,
                                        gapEra = 100)

cohortGapEra(cdm$drug_cohorts)
# }

Run the code above in your browser using DataLab