indicationToStrata {DrugUtilisation} | R Documentation |
Create new variables summarising the data of indication that can be used as stratification columns
Description
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
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
cdm[["cohort1"]] <- cdm[["cohort1"]] %>%
addIndication(indicationCohortName = "cohort2") %>%
indicationToStrata()
[Package DrugUtilisation version 0.6.0 Index]