Skip to contents

Create new variables summarising the data of indication that can be used as stratification columns

Usage

indicationToStrata(
  cohort,
  indicationVariables = indicationColumns(cohort),
  keep = FALSE
)

Arguments

cohort

A cohort in the cdm

indicationVariables

Indication variables that we want to join

keep

Whether to keep the prior indication variables or not

Value

description The cohort with the new variable

Examples

# \donttest{
library(DrugUtilisation)

cdm <- mockDrugUtilisation()
cdm[["cohort1"]] <- cdm[["cohort1"]] %>%
  addIndication(indicationCohortName = "cohort2") %>%
  indicationToStrata()
# }