data_to_use_str: Function to clean and combine ADAE dataset with ADSL

data_to_use_strR Documentation

Function to clean and combine ADAE dataset with ADSL

Description

Function to clean and combine ADAE dataset with ADSL

Usage

data_to_use_str(x, ae_data, bds_data)

Arguments

x

string, naming a data.frame.

ae_data

data.frame, of the AE variety

bds_data

data.frame, of the BDS variety

Value

A 'data.frame' object containing data of the AE variety if 'x == "ADAE"' or one of the BDS variety if not.

Examples

if(interactive()) {
  datalist <- list(ADSL = tidyCDISC::adsl, ADVS = tidyCDISC::advs, 
                   ADAE = tidyCDISC::adae, ADLBC = tidyCDISC::adlbc)
                 
  pre_adsl <- prep_adsl(datalist$ADSL, input_recipe = 'NONE')
  pre_adae <- prep_adae(datalist, pre_adsl$data, 'NONE')
  ae_data <- pre_adae$data
  bds_data <- prep_bds(datalist, ADSL = pre_adsl$data)
  
  all.equal(data_to_use_str("ADAE", ae_data, bds_data), ae_data)
  all.equal(data_to_use_str("ADSL", ae_data, bds_data), bds_data)
}

Biogen-Inc/tidyCDISC documentation built on April 22, 2023, 2:12 p.m.