prepare_arm_levels {teal.modules.clinical}R Documentation

Expression: Prepare Arm Levels

Description

This function generates the standard expression for pre-processing of dataset arm levels in and is used to apply the same steps in safety teal modules.

Usage

prepare_arm_levels(dataname, parentname, arm_var, drop_arm_levels = TRUE)

Arguments

dataname

(character)
analysis data used in teal module.

parentname

(character)
parent analysis data used in teal module, usually this refers to ADSL.

arm_var

(character)
variable names that can be used as arm_var.

drop_arm_levels

(logical)
whether to drop unused levels of arm_var. If TRUE, arm_var levels are set to those used in the dataname dataset. If FALSE, arm_var levels are set to those used in the parentname dataset. If dataname and parentname are the same, then drop_arm_levels is set to TRUE and user input for this parameter is ignored.

Value

a ⁠{⁠ object. See base::Paren() for details.

Examples

prepare_arm_levels(
  dataname = "adae",
  parentname = "adsl",
  arm_var = "ARMCD",
  drop_arm_levels = TRUE
)

prepare_arm_levels(
  dataname = "adae",
  parentname = "adsl",
  arm_var = "ARMCD",
  drop_arm_levels = FALSE
)


[Package teal.modules.clinical version 0.9.1 Index]