Skip to content

Commit

Permalink
Merge 60c9205 into 36d0781
Browse files Browse the repository at this point in the history
  • Loading branch information
edelarua committed Jul 28, 2022
2 parents 36d0781 + 60c9205 commit d696103
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
`Time to onset of ADA (Weeks)`, and `ADA Duration (Weeks)` to `PARAM` in `adab`.
* Add `AEWITHFL` variable to `adsl`.
* Add `ATIREL` variable to `admh`.
* Add variables `CMSTRTPT`, `CMENRTPT`, `ADURN`, and `ADURU` to `adcm`.

# random.cdisc.data 0.3.13

Expand Down
17 changes: 16 additions & 1 deletion R/radcm.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,22 @@ radcm <- function(ADSL, # nolint
dplyr::mutate(CMDOSFRQ = sample(c(
"Q4W", "QN", "Q4H", "UNKNOWN", "TWICE",
"Q4H", "QD", "TID", "4 TIMES PER MONTH"
), dplyr::n(), replace = TRUE))
), dplyr::n(), replace = TRUE)) %>%
dplyr::mutate(
# use 1 year as reference time point
CMSTRTPT = dplyr::case_when(
ASTDY <= 365 ~ "BEFORE",
ASTDY > 365 ~ "AFTER",
is.na(ASTDY) ~ "U"
),
CMENRTPT = dplyr::case_when(
EOSSTT %in% c("COMPLETED", "DISCONTINUED") ~ "BEFORE",
EOSSTT == "ONGOING" ~ "ONGOING",
is.na(EOSSTT) ~ "U"
),
ADURN = (AENDTM - ASTDTM) / 86400,
ADURU = "days"
)


# Optional WHO coding, which adds more `ATC` paths for randomly selected `CMDECOD`.
Expand Down
Binary file modified data/cadcm.RData
Binary file not shown.
12 changes: 12 additions & 0 deletions inst/metadata/ADCM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,15 @@ variables:
CMDOSFRQ:
label: Dosing Frequency per Interval
type: factor
CMSTRTPT:
label: Start Relative to Reference Time Point
type: factor
CMENRTPT:
label: End Relative to Reference Time Point
type: factor
ADURN:
label: Analysis Duration
type: integer
ADURU:
label: Analysis Duration Units
type: factor
2 changes: 1 addition & 1 deletion man/cadcm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d696103

Please sign in to comment.