B: Placebo C: Combination
MedDRA SOC and Preferred Term (N=134) (N=132)
———————————————————————————————————————————————————————————
Total number of deaths 70 (52.2%) 75 (56.8%)
cl D.1 / dcd D.1.1.1.1 42 (31.3%) 51 (38.6%)
cl B.1 / dcd B.1.1.1.1 49 (36.6%) 43 (32.6%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
A: Drug X B: Placebo C: Combination
MedDRA SOC and Preferred Term (N=134) (N=134) (N=132)
———————————————————————————————————————————————————————————————————————
Total number of deaths 0 70 (52.2%) 75 (56.8%)
cl D.1 / dcd D.1.1.1.1 0 42 (31.3%) 51 (38.6%)
cl B.1 / dcd B.1.1.1.1 0 49 (36.6%) 43 (32.6%)
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Alternatively, copy the code and click here to open WebR in a new tab.
For illustrative purposes, we will pre-process AESDTH in ADAE so there are no deaths in arm A and concatenate AEBODSYS and AEDECOD as per GDSR output standards for AET07.
Code
library(dplyr)library(tern)adsl <- random.cdisc.data::cadsladae <- random.cdisc.data::cadae# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adsl <-df_explicit_na(adsl)adae <-df_explicit_na(adae)adae_f <- adae %>%mutate(AESDTH =as.character(AESDTH), # characterizing AESDTH for next stepAESDTH =case_when( ARM =="A: Drug X"~NA_character_, # For demonstration purpose only,TRUE~ AESDTH ), # make "A: Drug X" as the arm without AE leading to deathAESDTH =as.factor(AESDTH),SOC_PT =factor(paste(AEBODSYS, "/", AEDECOD)) ) %>%filter(AESDTH =="Y") %>%mutate(ARM =droplevels(ARM))
library(teal.modules.clinical)## Data reproducible codedata <-teal_data()data <-within(data, {library(dplyr) ADSL <- random.cdisc.data::cadsl ADAE <- random.cdisc.data::cadae# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <-df_explicit_na(ADSL) ADAE <-df_explicit_na(ADAE) ADSL <- ADSL %>%mutate(DTHFL =case_when(!is.na(DTHDT) ~"Y",TRUE~"" ) ) %>%col_relabel(DTHFL ="Subject Death Flag" ) ADAE <- ADAE %>%mutate(AESDTH =as.character(AESDTH), # characterizing AESDTH for next stepAESDTH =case_when( ARM =="A: Drug X"~NA_character_, # For demonstration purpose only,TRUE~ AESDTH ), # make "A: Drug X" as the arm without AE leading to deathAESDTH =as.factor(AESDTH),SOC_PT =factor(paste(AEBODSYS, "/", AEDECOD)) ) %>%filter(AESDTH =="Y") %>%mutate(ARM =droplevels(ARM)) %>%col_relabel(SOC_PT ="MedDRA SOC and Preferred Term")})datanames <-c("ADSL", "ADAE")datanames(data) <- datanames
Warning: `datanames<-()` was deprecated in teal.data 0.7.0.
ℹ invalid to use `datanames()<-` or `names()<-` on an object of class
`teal_data`. See ?names.teal_data
shinylive allow you to modify to run shiny application entirely in the web browser. Modify the code below and click re-run the app to see the results. The performance is slighly worse and some of the features (e.g. downloading) might not work at all.