diff --git a/RNA-seq/app.R b/RNA-seq/app.R index 1c4b2fe0..1eba1e85 100644 --- a/RNA-seq/app.R +++ b/RNA-seq/app.R @@ -7,9 +7,11 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers ## Data reproducible code ---- data <- teal_data() data <- within(data, { - library(scda.2022) library(nestcolor) - ADTTE <- scda::synthetic_cdisc_dataset("rcd_2022_06_27", "adtte") %>% + library(random.cdisc.data) + + ADSL <- radsl(seed = 1) + ADTTE <- radtte(ADSL, seed = 1) %>% dplyr::mutate(is_event = CNSR == 0) MAE <- hermes::multi_assay_experiment }) diff --git a/RNA-seq/renv.lock b/RNA-seq/renv.lock index ab801735..02f9ea23 100644 --- a/RNA-seq/renv.lock +++ b/RNA-seq/renv.lock @@ -2660,37 +2660,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape", diff --git a/early-dev/app.R b/early-dev/app.R index 5d1e6ad5..dce2c103 100644 --- a/early-dev/app.R +++ b/early-dev/app.R @@ -8,14 +8,13 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers ## Data reproducible code ---- data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(random.cdisc.data) library(dplyr) library(nestcolor) # optional libraries library(sparkline) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + ADSL <- radsl(seed = 1) # derive ADSL treatment duration adsl_labels <- teal.data::col_labels(ADSL, fill = FALSE) @@ -34,7 +33,7 @@ data <- within(data, { droplevels() teal.data::col_labels(ADSL)[c(names(adsl_labels))] <- adsl_labels - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADAE <- radae(ADSL, seed = 1) # derive common flags for AEs adae_labels <- teal.data::col_labels(ADAE, fill = FALSE) @@ -67,7 +66,7 @@ data <- within(data, { AELLT = "Lowest Level Term" ) - ADCM <- synthetic_cdisc_dataset("latest", "adcm") + ADCM <- radcm(ADSL, seed = 1) # process ADCM ADCM <- ADCM %>% @@ -80,7 +79,7 @@ data <- within(data, { AENDT = "Analysis End Date" ) - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADEX <- radex(ADSL, seed = 1) # process ADEX ADEX <- ADEX %>% @@ -93,7 +92,7 @@ data <- within(data, { AENDT = "Analysis End Date" ) - ADTR <- synthetic_cdisc_dataset("latest", "adtr") + ADTR <- radtr(ADSL, seed = 1) # process ADTR adtr_labels <- teal.data::col_labels(ADTR, fill = FALSE) @@ -113,11 +112,11 @@ data <- within(data, { # process ADRS - ADRSSWIM <- synthetic_cdisc_dataset("latest", "adrs") %>% + ADRSSWIM <- radrs(ADSL, seed = 1) %>% filter(PARAMCD == "OVRINV") %>% arrange(USUBJID) - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + ADRS <- radrs(ADSL, seed = 1) adrs_labels <- teal.data::col_labels(ADRS, fill = FALSE) ADRS <- ADRS %>% filter(PARAMCD %in% c("BESRSPI", "INVET")) %>% @@ -125,7 +124,7 @@ data <- within(data, { droplevels() teal.data::col_labels(ADRS)["ADT"] <- "Analysis Date" - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADLB <- radlb(ADSL, seed = 1) # process ADLB ADLB <- ADLB %>% diff --git a/early-dev/renv.lock b/early-dev/renv.lock index def1e367..b0cad1f2 100644 --- a/early-dev/renv.lock +++ b/early-dev/renv.lock @@ -2312,37 +2312,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape", diff --git a/efficacy/app.R b/efficacy/app.R index e1bbf131..1d313661 100644 --- a/efficacy/app.R +++ b/efficacy/app.R @@ -8,13 +8,12 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers data <- teal_data() data <- within(data, { library(dplyr) - library(scda) - library(scda.2022) + library(random.cdisc.data) library(nestcolor) # optional libraries library(sparkline) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + ADSL <- radsl(seed = 1) adsl_labels <- teal.data::col_labels(ADSL, fill = FALSE) char_vars_asl <- names(Filter(isTRUE, sapply(ADSL, is.character))) @@ -34,14 +33,14 @@ data <- within(data, { teal.data::col_labels(ADSL) <- adsl_labels - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + ADTTE <- radtte(ADSL, seed = 1) - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + ADRS <- radrs(ADSL, seed = 1) adrs_labels <- teal.data::col_labels(ADRS, fill = FALSE) ADRS <- filter(ADRS, PARAMCD == "BESRSPI" | AVISIT == "FOLLOW UP") teal.data::col_labels(ADRS) <- adrs_labels - ADQS <- synthetic_cdisc_dataset("latest", "adqs") + ADQS <- radqs(ADSL, seed = 1) adqs_labels <- teal.data::col_labels(ADQS, fill = FALSE) ADQS <- ADQS %>% filter(ABLFL != "Y" & ABLFL2 != "Y") %>% diff --git a/efficacy/renv.lock b/efficacy/renv.lock index e1cb1797..176172fa 100644 --- a/efficacy/renv.lock +++ b/efficacy/renv.lock @@ -2108,37 +2108,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape", diff --git a/exploratory/app.R b/exploratory/app.R index 3686ddaf..e9ce7048 100644 --- a/exploratory/app.R +++ b/exploratory/app.R @@ -9,8 +9,7 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers ## Data reproducible code ---- data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(random.cdisc.data) library(dplyr) library(tidyr) library(ggExtra) @@ -30,9 +29,9 @@ data <- within(data, { library(sparkline) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADSL <- radsl(seed = 1) + ADRS <- radrs(ADSL, seed = 1) + ADLB <- radlb(ADSL, seed = 1) ADLBPCA <- ADLB %>% dplyr::select(USUBJID, STUDYID, SEX, ARMCD, AVAL, AVISIT, PARAMCD) %>% tidyr::pivot_wider( diff --git a/exploratory/renv.lock b/exploratory/renv.lock index f8354340..842513b5 100644 --- a/exploratory/renv.lock +++ b/exploratory/renv.lock @@ -1912,37 +1912,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shiny": { "Package": "shiny", diff --git a/longitudinal/app.R b/longitudinal/app.R index 682386ec..a7477567 100644 --- a/longitudinal/app.R +++ b/longitudinal/app.R @@ -12,8 +12,7 @@ data <- within(data, { library(DescTools) library(magrittr) library(dplyr) - library(scda) - library(scda.2022) + library(random.cdisc.data) library(stringr) # optional libraries library(sparkline) @@ -23,8 +22,8 @@ data <- within(data, { # depending on if the data are SUBJECT LEVEL ANALYSIS DATASET or BASIC DATA STRUCTURE # if for example outcome variables are added to ADSL then do also add them as columns to ADLB # this is needed to be able to use plot splitting by outcome functionality - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADSL <- radsl(seed = 1) + ADLB <- radlb(ADSL, seed = 1) ################################################################################ # BEGIN: Analyst Input Required To Modify Values Below To Reflect Study Specifics diff --git a/longitudinal/renv.lock b/longitudinal/renv.lock index 81e7298f..418e0545 100644 --- a/longitudinal/renv.lock +++ b/longitudinal/renv.lock @@ -2363,37 +2363,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape", diff --git a/patient-profile/app.R b/patient-profile/app.R index 475fcf38..0b47f49b 100644 --- a/patient-profile/app.R +++ b/patient-profile/app.R @@ -7,16 +7,15 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers ## Data reproducible code ---- data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(random.cdisc.data) library(nestcolor) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADMH <- synthetic_cdisc_dataset("latest", "admh") - ADAE <- synthetic_cdisc_dataset("latest", "adae") - ADCM <- synthetic_cdisc_dataset("latest", "adcm") - ADVS <- synthetic_cdisc_dataset("latest", "advs") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADSL <- radsl(seed = 1) + ADMH <- radmh(ADSL, seed = 1) + ADAE <- radae(ADSL, seed = 1) + ADCM <- radcm(ADSL, seed = 1) + ADVS <- radvs(ADSL, seed = 1) + ADLB <- radlb(ADSL, seed = 1) ## Modify ADCM ADCM$CMINDC <- paste0("Indication_", as.numeric(ADCM$CMDECOD)) diff --git a/patient-profile/renv.lock b/patient-profile/renv.lock index 04f7d8b0..45fc1ca4 100644 --- a/patient-profile/renv.lock +++ b/patient-profile/renv.lock @@ -2113,37 +2113,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape", diff --git a/safety/app.R b/safety/app.R index 1428551c..7ce4798c 100644 --- a/safety/app.R +++ b/safety/app.R @@ -7,16 +7,15 @@ nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers ## Data reproducible code ---- data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(random.cdisc.data) library(dplyr) library(nestcolor) # optional libraries library(sparkline) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") - ADAETTE <- synthetic_cdisc_dataset("latest", "adaette") + ADSL <- radsl(seed = 1) + ADAE <- radae(ADSL, seed = 1) + ADAETTE <- radaette(ADSL, seed = 1) ADAETTE <- ADAETTE %>% mutate(is_event = case_when( grepl("TOT", .data$PARAMCD, fixed = TRUE) ~ TRUE, @@ -41,7 +40,7 @@ data <- within(data, { full_join(ADAETTE_AE, ADAETTE_TTE, by = c("USUBJID", "ARM", "ARMCD")) ADAETTE <- rbind(ADAETTE_AE, ADAETTE_OTH) - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADEX <- radex(ADSL, seed = 1) ADEX_labels <- teal.data::col_labels(ADEX, fill = FALSE) # Below steps are done to simulate data with TDURD parameter as it is not in the ADEX data from scda package set.seed(1, kind = "Mersenne-Twister") @@ -64,12 +63,12 @@ data <- within(data, { PARAMCD %in% c("TDOSE", "TNDOSE", "TDURD")) teal.data::col_labels(ADEX) <- ADEX_labels - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADLB <- radlb(ADSL, seed = 1) - ADEG <- synthetic_cdisc_dataset("latest", "adeg") + ADEG <- radeg(ADSL, seed = 1) # For real data, ADVS needs some preprocessing like group different ANRIND and BNRIND into abnormal - ADVS <- synthetic_cdisc_dataset("latest", "advs") %>% + ADVS <- radvs(ADSL, seed = 1) %>% mutate(ONTRTFL = ifelse(AVISIT %in% c("SCREENING", "BASELINE"), "", "Y")) %>% teal.data::col_relabel(ONTRTFL = "On Treatment Record Flag") %>% mutate(ANRIND = as.character(ANRIND), BNRIND = as.character(BNRIND)) %>% @@ -86,8 +85,7 @@ data <- within(data, { ) ) - ADCM <- - synthetic_cdisc_dataset("latest", "adcm") %>% mutate(CMSEQ = as.integer(CMSEQ)) + ADCM <- radcm(ADSL, seed = 1) %>% mutate(CMSEQ = as.integer(CMSEQ)) # Add study-specific pre-processing: convert arm, param and visit variables to factors # Sample code: diff --git a/safety/renv.lock b/safety/renv.lock index 326c0bee..f87f64e4 100644 --- a/safety/renv.lock +++ b/safety/renv.lock @@ -2113,37 +2113,25 @@ ], "Hash": "c19df082ba346b0ffa6f833e92de34d1" }, - "scda": { - "Package": "scda", - "Version": "0.1.6", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda", - "RemoteRef": "v0.1.6", - "RemoteSha": "665d4540a8f3c9e8d9271c33b5dd70296b49636c", - "Remotes": "insightsengineering/scda.2022@*release", + "random.cdisc.data": { + "Package": "random.cdisc.data", + "Version": "0.3.15", + "Source": "Repository", + "Repository": "CRAN", "Requirements": [ "R", - "utils" - ], - "Hash": "050ae235c739506fb50990d8e03518bb" - }, - "scda.2022": { - "Package": "scda.2022", - "Version": "0.1.5", - "Source": "GitHub", - "RemoteType": "github", - "RemoteHost": "api.github.com", - "RemoteUsername": "insightsengineering", - "RemoteRepo": "scda.2022", - "RemoteRef": "v0.1.5", - "RemoteSha": "5b08051312fababe15476f21323d17bcbb0543cf", - "Requirements": [ - "R" + "checkmate", + "dplyr", + "lifecycle", + "lubridate", + "magrittr", + "rlang", + "stringr", + "tibble", + "tidyr", + "yaml" ], - "Hash": "0e04543b6e8a5f658699c9cdc50534c8" + "Hash": "c92edb70a24230a0b30f961c431c9fdf" }, "shape": { "Package": "shape",