File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,23 @@ data <- within(teal_data(), {
66 library(dplyr )
77 library(osprey )
88
9- ADSL <- osprey :: rADSL [1 : 20 , ]
10- ADRS <- filter(rADRS , PARAMCD == " OVRINV" )
9+ ADSL <- osprey :: rADSL | >
10+ mutate(x_val = as.integer(TRTEDTM - TRTSDTM ))
11+ ADRS <- osprey :: rADRS
1112})
1213
14+ join_keys(data ) <- default_cdisc_join_keys [c(" ADSL" , " ADRS" )]
15+
1316plotly_specs <- list (
1417 list (
1518 " plotly::add_bars" ,
1619 data = quote(ADSL ),
17- x = ~ as.integer( TRTEDTM - TRTSDTM ) , y = ~ USUBJID , color = ~ ARM ,
20+ x = ~ x_val , y = ~ USUBJID , color = ~ ARM ,
1821 colors = c(" A: Drug X" = " #343CFF" , " B: Placebo" = " #FF484B" , " C: Combination" = " #222222" )
1922 ),
2023 list (
2124 " plotly::add_markers" ,
22- data = quote(left_join( ADSL , ADRS ) ),
25+ data = quote(ADRS ),
2326 x = ~ ADY , y = ~ USUBJID , symbol = ~ AVALC ,
2427 marker = list (
2528 size = 10 ,
@@ -30,6 +33,18 @@ plotly_specs <- list(
3033
3134app <- init(
3235 data = data ,
36+ filter = teal_slices(
37+ teal_slice(
38+ " ADSL" ,
39+ " AGE" ,
40+ selected = c(20 , 23 )
41+ ),
42+ teal_slice(
43+ " ADRS" ,
44+ " PARAMCD" ,
45+ selected = " OVRINV"
46+ )
47+ ),
3348 modules = modules(
3449 tm_data_table(),
3550 tm_p_swimlane2(
You can’t perform that action at this time.
0 commit comments