Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace scda with random.cdisc.data #170

Merged
merged 13 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
echo "BRANCH_NAME=dev" >> $GITHUB_ENV
if [ "${{ matrix.channel }}" == "stable" ]; then
echo "BRANCH_NAME=main" >> $GITHUB_ENV
echo "BRANCH_NAME=154-use-rcd@main" >> $GITHUB_ENV
vedhav marked this conversation as resolved.
Show resolved Hide resolved
fi

- name: Setup job token 🔑
Expand Down
6 changes: 4 additions & 2 deletions RNA-seq/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down
76 changes: 44 additions & 32 deletions RNA-seq/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,19 @@
],
"Hash": "c145edf05cc128e6ffcfa5d872c46329"
},
"lubridate": {
"Package": "lubridate",
"Version": "1.9.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"generics",
"methods",
"timechange"
],
"Hash": "680ad542fbcf801442c83a6ac5a2126c"
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.3",
Expand Down Expand Up @@ -2513,6 +2526,26 @@
],
"Hash": "082e1a198e3329d571f4448ef0ede4bc"
},
"random.cdisc.data": {
"Package": "random.cdisc.data",
"Version": "0.3.15",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"checkmate",
"dplyr",
"lifecycle",
"lubridate",
"magrittr",
"rlang",
"stringr",
"tibble",
"tidyr",
"yaml"
],
"Hash": "c92edb70a24230a0b30f961c431c9fdf"
},
"rappdirs": {
"Package": "rappdirs",
"Version": "0.3.3",
Expand Down Expand Up @@ -2660,38 +2693,6 @@
],
"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",
"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"
],
"Hash": "0e04543b6e8a5f658699c9cdc50534c8"
},
"shape": {
"Package": "shape",
"Version": "1.4.6.1",
Expand Down Expand Up @@ -3342,6 +3343,17 @@
],
"Hash": "829f27b9c4919c16b593794a6344d6c0"
},
"timechange": {
"Package": "timechange",
"Version": "0.3.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cpp11"
],
"Hash": "c5f3c201b931cd6474d17d8700ccb1c8"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.50",
Expand Down
19 changes: 9 additions & 10 deletions early-dev/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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 %>%
Expand All @@ -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 %>%
Expand All @@ -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)
Expand All @@ -113,19 +112,19 @@ 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")) %>%
mutate(ADT = as.Date(ADTM)) %>%
droplevels()
teal.data::col_labels(ADRS)["ADT"] <- "Analysis Date"

ADLB <- synthetic_cdisc_dataset("latest", "adlb")
ADLB <- radlb(ADSL, seed = 1)

# process ADLB
ADLB <- ADLB %>%
Expand Down
76 changes: 44 additions & 32 deletions early-dev/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,19 @@
],
"Hash": "c145edf05cc128e6ffcfa5d872c46329"
},
"lubridate": {
"Package": "lubridate",
"Version": "1.9.3",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
"R",
"generics",
"methods",
"timechange"
],
"Hash": "680ad542fbcf801442c83a6ac5a2126c"
},
"magrittr": {
"Package": "magrittr",
"Version": "2.0.3",
Expand Down Expand Up @@ -2093,6 +2106,26 @@
],
"Hash": "082e1a198e3329d571f4448ef0ede4bc"
},
"random.cdisc.data": {
"Package": "random.cdisc.data",
"Version": "0.3.15",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"checkmate",
"dplyr",
"lifecycle",
"lubridate",
"magrittr",
"rlang",
"stringr",
"tibble",
"tidyr",
"yaml"
],
"Hash": "c92edb70a24230a0b30f961c431c9fdf"
},
"rappdirs": {
"Package": "rappdirs",
"Version": "0.3.3",
Expand Down Expand Up @@ -2312,38 +2345,6 @@
],
"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",
"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"
],
"Hash": "0e04543b6e8a5f658699c9cdc50534c8"
},
"shape": {
"Package": "shape",
"Version": "1.4.6.1",
Expand Down Expand Up @@ -3051,6 +3052,17 @@
],
"Hash": "829f27b9c4919c16b593794a6344d6c0"
},
"timechange": {
"Package": "timechange",
"Version": "0.3.0",
"Source": "Repository",
"Repository": "RSPM",
"Requirements": [
"R",
"cpp11"
],
"Hash": "c5f3c201b931cd6474d17d8700ccb1c8"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.50",
Expand Down
11 changes: 5 additions & 6 deletions efficacy/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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") %>%
Expand Down
Loading
Loading