derive_var_basetype: Derive Basetype Variable

View source: R/derive_var_basetype.R

derive_var_basetypeR Documentation

Derive Basetype Variable

Description

[Deprecated]

This function is deprecated, please use derive_basetype_records() instead.

Baseline Type BASETYPE is needed when there is more than one definition of baseline for a given Analysis Parameter PARAM in the same dataset. For a given parameter, if Baseline Value BASE is populated, and there is more than one definition of baseline, then BASETYPE must be non-null on all records of any type for that parameter. Each value of BASETYPE refers to a definition of baseline that characterizes the value of BASE on that row. Please see section 4.2.1.6 of the ADaM Implementation Guide, version 1.3 for further background.

Adds the BASETYPE variable to a dataset and duplicates records based upon the provided conditions.

Usage

derive_var_basetype(dataset, basetypes)

Arguments

dataset

Input dataset

The columns specified in the expressions inside basetypes are required.

basetypes

A named list of expressions created using the rlang::exprs() function

The names corresponds to the values of the newly created BASETYPE variables and the expressions are used to subset the input dataset.

Details

For each element of basetypes the input dataset is subset based upon the provided expression and the BASETYPE variable is set to the name of the expression. Then, all subsets are stacked. Records which do not match any condition are kept and BASETYPE is set to NA.

Value

The input dataset with variable BASETYPE added

See Also

Other deprecated: derive_param_extreme_event(), derive_var_confirmation_flag(), derive_var_last_dose_amt(), derive_var_last_dose_date(), derive_var_last_dose_grp(), derive_var_merged_cat(), derive_var_merged_character(), derive_vars_last_dose()


admiral documentation built on Oct. 19, 2023, 1:08 a.m.