diff --git a/NEWS.md b/NEWS.md index f9a5cea..c9e3225 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - Pediatrics data for anthropometric measures (`dm_peds` and `vs_peds`) was added (#88). +- Add `CMENRTPT` to `cm`. (#120) +
Developer Notes diff --git a/data-raw/cm.R b/data-raw/cm.R index eef48fe..b5bac87 100644 --- a/data-raw/cm.R +++ b/data-raw/cm.R @@ -4,10 +4,12 @@ # Load libraries ----- library(haven) library(admiral) +library(dplyr) # Create cm ---- raw_cm <- read_xpt("https://github.com/cdisc-org/sdtm-adam-pilot-project/blob/master/updated-pilot-submission-package/900172/m5/datasets/cdiscpilot01/tabulations/sdtm/cm.xpt?raw=true") # nolint -cm <- convert_blanks_to_na(raw_cm) +cm <- convert_blanks_to_na(raw_cm) %>% + mutate(CMENRTPT = if_else(is.na(CMENDTC), "ONGOING", NA_character_)) # Label dataset ---- attr(cm, "label") <- "Concomitant Medications" diff --git a/data/cm.rda b/data/cm.rda index 255b982..da20c55 100644 Binary files a/data/cm.rda and b/data/cm.rda differ diff --git a/man/cm.Rd b/man/cm.Rd index e69cf8e..cd3db75 100644 --- a/man/cm.Rd +++ b/man/cm.Rd @@ -5,7 +5,7 @@ \alias{cm} \title{Concomitant Medication} \format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 7510 rows and 21 columns. +An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 7510 rows and 22 columns. } \source{ \url{https://github.com/cdisc-org/sdtm-adam-pilot-project/blob/master/updated-pilot-submission-package/900172/m5/datasets/cdiscpilot01/tabulations/sdtm/cm.xpt?raw=true} # nolint