insightsengineering / random.cdisc.data

Create random CDISC data
https://insightsengineering.github.io/random.cdisc.data/
Other
32 stars 6 forks source link

add variable `AERELNST` to dataset `ADAE` #101

Closed waddella closed 2 years ago

waddella commented 2 years ago

Motivation

While developing the Patient profile module in TMC, we encountered multiple variables that were not present in random cdisc data (RCD) datasets and could be useful for future usage. See original issue.

Todo

In the function radae add the variables:

Update NEWS.md

Definition of done

shajoezhu commented 2 years ago

Possible values for AERELNST include:

"CONCURRENT ILLNESS" "OTHER" "DISEASE UNDER STUDY" "NONE"

shajoezhu commented 2 years ago
dplyr::mutate(AERELNST = sample(
      x = c("CONCURRENT ILLNESS", "OTHER", "DISEASE UNDER STUDY", "NONE"),
      prob = c(0.3, 0.3, 0.3, 0.1),
      size = dplyr::n(),
      replace = TRUE
    ))