A: Drug X B: Placebo C: Combination All Patients
(N=134) (N=134) (N=132) (N=400)
———————————————————————————————————————————————————————————————————————————————————————————————————————
Age (yr)
n 134 134 132 400
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) 34.9 (7.4)
Median 33.0 35.0 35.0 34.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 20.0 - 69.0
Age Group
n 134 134 132 400
18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) 322 (80.5%)
41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) 77 (19.2%)
>=65 0 0 1 (0.8%) 1 (0.2%)
Sex
n 134 134 132 400
Female 79 (59%) 82 (61.2%) 70 (53%) 231 (57.8%)
Male 55 (41%) 52 (38.8%) 62 (47%) 169 (42.2%)
Ethnicity
n 134 134 132 400
HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) 48 (12%)
NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) 308 (77%)
NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%)
UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%)
Race
n 134 134 132 400
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) 208 (52%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) 91 (22.8%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) 74 (18.5%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) 25 (6.2%)
MULTIPLE 0 1 (0.7%) 0 1 (0.2%)
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 1 (0.2%)
OTHER 0 0 0 0
UNKNOWN 0 0 0 0
Continous Level Biomarker 1
n 134 134 132 400
Mean (SD) 6.0 (3.6) 5.7 (3.3) 5.6 (3.5) 5.8 (3.4)
Median 5.4 4.8 4.6 4.8
Min - Max 0.4 - 17.7 0.6 - 14.2 0.2 - 21.4 0.2 - 21.4
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
(N=134) (N=134) (N=132)
————————————————————————————————————————————————————————————————————————————————————————
Age (yr)
n 134 134 132
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7)
Median 33.0 35.0 35.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0
Age Group
n 134 134 132
18-40 113 (84.3%) 103 (76.9%) 106 (80.3%)
41-64 21 (15.7%) 31 (23.1%) 25 (18.9%)
>=65 0 0 1 (0.8%)
Sex
n 134 134 132
Female 79 (59%) 82 (61.2%) 70 (53%)
Male 55 (41%) 52 (38.8%) 62 (47%)
Ethnicity
n 134 134 132
HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%)
NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%)
NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%)
UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%)
Race
n 134 134 132
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%)
MULTIPLE 0 1 (0.7%) 0
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0
OTHER 0 0 0
UNKNOWN 0 0 0
Biomarker 1 Categories
n 134 134 132
LOW 33 (24.6%) 41 (30.6%) 38 (28.8%)
MEDIUM 84 (62.7%) 76 (56.7%) 80 (60.6%)
HIGH 17 (12.7%) 17 (12.7%) 14 (10.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
(N=134) (N=134) (N=132)
————————————————————————————————————————————————————————————————————————————————————————
Age
n 134 134 132
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7)
Median 33.0 35.0 35.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0
Sex
n 134 134 132
Female 79 (59%) 82 (61.2%) 70 (53%)
Male 55 (41%) 52 (38.8%) 62 (47%)
Race
n 134 134 132
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%)
MULTIPLE 0 1 (0.7%) 0
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0
OTHER 0 0 0
UNKNOWN 0 0 0
A
n 38 44 40
Mean (SD) 5.8 (3.8) 5.4 (3.2) 5.1 (3.2)
Median 5.1 4.5 3.8
Min - Max 0.4 - 17.7 1.4 - 14.2 1.5 - 14.0
B
n 47 45 43
Mean (SD) 6.1 (3.6) 5.8 (3.6) 5.7 (3.4)
Median 5.2 4.8 5.1
Min - Max 1.6 - 17.2 0.6 - 13.3 0.2 - 16.5
C
n 49 45 49
Mean (SD) 6.0 (3.4) 5.9 (3.2) 6.0 (3.8)
Median 5.8 5.6 4.5
Min - Max 0.5 - 15.1 1.5 - 13.9 1.2 - 21.4
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
(N=134) (N=134) (N=132)
——————————————————————————————————————————————————————————————————————————————————————————
Age (yr)
n 134 134 132
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7)
Median 33.0 35.0 35.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0
Sex
n 134 134 132
Female 79 (59%) 82 (61.2%) 70 (53%)
Male 55 (41%) 52 (38.8%) 62 (47%)
Race
n 134 134 132
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%)
MULTIPLE 0 1 (0.7%) 0
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0
OTHER 0 0 0
UNKNOWN 0 0 0
Diastolic Blood Pressure
n 134 134 132
Mean (SD) 96.5 (19.9) 101.1 (19.9) 102.8 (19.5)
Median 96.0 100.4 102.0
Min - Max 44.3 - 136.6 29.2 - 143.8 49.4 - 153.5
Systolic Blood Pressure
n 134 134 132
Mean (SD) 151.7 (31.5) 149.5 (26.5) 144.7 (30.1)
Median 150.1 153.0 146.5
Min - Max 69.1 - 231.2 87.2 - 220.9 71.8 - 220.2
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
(N=134) (N=134) (N=132)
——————————————————————————————————————————————————————————————————————————————————————————
Age (yr)
n 134 134 132
Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7)
Median 33.0 35.0 35.0
Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0
Sex
n 134 134 132
Female 79 (59%) 82 (61.2%) 70 (53%)
Male 55 (41%) 52 (38.8%) 62 (47%)
Race
n 134 134 132
ASIAN 68 (50.7%) 67 (50%) 73 (55.3%)
BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%)
WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%)
AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%)
MULTIPLE 0 1 (0.7%) 0
NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0
OTHER 0 0 0
UNKNOWN 0 0 0
Baseline BMI
n 134 134 132
Mean (SD) 30.0 (18.3) 32.4 (23.2) 30.1 (18.4)
Median 27.1 31.1 30.0
Min - Max -6.9 - 75.9 -26.6 - 117.9 -44.2 - 87.5
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.
Code
library(tern)library(dplyr)library(tidyr)adsl <- random.cdisc.data::cadsladvs <- random.cdisc.data::cadvsadsub <- random.cdisc.data::cadsub# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.adsl <-df_explicit_na(adsl)advs <-df_explicit_na(advs)adsub <-df_explicit_na(adsub)# Change description in variable SEX.adsl <- adsl %>%mutate(SEX =factor(case_when( SEX =="M"~"Male", SEX =="F"~"Female", SEX =="U"~"Unknown", SEX =="UNDIFFERENTIATED"~"Undifferentiated" )),AGEGR1 =factor(case_when(between(AGE, 18, 40) ~"18-40",between(AGE, 41, 64) ~"41-64", AGE >64~">=65" ),levels =c("18-40", "41-64", ">=65") ),BMRKR1_CAT =factor(case_when( BMRKR1 <3.5~"LOW", BMRKR1 >=3.5& BMRKR1 <10~"MEDIUM", BMRKR1 >=10~"HIGH" ),levels =c("LOW", "MEDIUM", "HIGH") ) ) %>%var_relabel(BMRKR1_CAT ="Biomarker 1 Categories" )# The developer needs to do pre-processing to add necessary variables based on ADVS to analysis dataset.# Obtain SBP, DBP and weight.get_param_advs <-function(pname, plabel) { ds <- advs %>%filter(PARAM == plabel & AVISIT =="BASELINE") %>%select(USUBJID, AVAL)colnames(ds) <-c("USUBJID", pname) ds}# The developer needs to do pre-processing to add necessary variables based on ADSUB to analysis dataset.# Obtain baseline BMI (BBMISI).get_param_adsub <-function(pname, plabel) { ds <- adsub %>%filter(PARAM == plabel) %>%select(USUBJID, AVAL)colnames(ds) <-c("USUBJID", pname) ds}adsl <- adsl %>%left_join(get_param_advs("SBP", "Systolic Blood Pressure"), by ="USUBJID") %>%left_join(get_param_advs("DBP", "Diastolic Blood Pressure"), by ="USUBJID") %>%left_join(get_param_advs("WGT", "Weight"), by ="USUBJID") %>%left_join(get_param_adsub("BBMISI", "Baseline BMI"), by ="USUBJID")
library(teal.modules.clinical)## Data reproducible codedata <-teal_data()data <-within(data, { ADSL <- random.cdisc.data::cadsl# Include `EOSDY` and `DCSREAS` variables below because they contain missing data.stopifnot(any(is.na(ADSL$EOSDY)),any(is.na(ADSL$DCSREAS)) )})datanames <-"ADSL"datanames(data) <- datanames
Warning: `datanames<-()` was deprecated in teal.data 0.6.1.
ℹ 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.
#| '!! shinylive warning !!': |#| shinylive does not work in self-contained HTML documents.#| Please set `embed-resources: false` in your metadata.#| standalone: true#| viewerHeight: 800#| editorHeight: 200#| components: [viewer, editor]#| layout: vertical# -- WEBR HELPERS --options(webr_pkg_repos = c("r-universe" = "https://pharmaverse.r-universe.dev", getOption("webr_pkg_repos")))# -- APP CODE --library(teal.modules.clinical)## Data reproducible codedata <- teal_data()data <- within(data, { ADSL <- random.cdisc.data::cadsl # Include `EOSDY` and `DCSREAS` variables below because they contain missing data. stopifnot( any(is.na(ADSL$EOSDY)), any(is.na(ADSL$DCSREAS)) )})datanames <- "ADSL"datanames(data) <- datanamesjoin_keys(data) <- default_cdisc_join_keys[datanames]## Setup Appapp <- init( data = data, modules = modules( tm_t_summary( label = "Demographic Table", dataname = "ADSL", arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), summarize_vars = choices_selected( c("SEX", "RACE", "BMRKR2", "EOSDY", "DCSREAS"), c("SEX", "RACE") ), useNA = "ifany" ) ))shinyApp(app$ui, app$server)