77# '
88# ' @inheritParams teal::module
99# ' @inheritParams shared_params
10+ # ' @inheritParams tm_data_table
1011# ' @param parent_dataname (`character(1)`) Specifies the parent dataset name. Default is `ADSL` for `CDISC` data.
1112# ' If provided and exists, enables additional analysis "by subject". For non-`CDISC` data, this parameter can be
1213# ' ignored.
110111tm_missing_data <- function (label = " Missing data" ,
111112 plot_height = c(600 , 400 , 5000 ),
112113 plot_width = NULL ,
114+ datasets_selected = character (0L ),
113115 parent_dataname = " ADSL" ,
114116 ggtheme = c(" classic" , " gray" , " bw" , " linedraw" , " light" , " dark" , " minimal" , " void" ),
115117 ggplot2_args = list (
@@ -143,6 +145,7 @@ tm_missing_data <- function(label = "Missing data",
143145 lower = plot_width [2 ], upper = plot_width [3 ], null.ok = TRUE , .var.name = " plot_width"
144146 )
145147
148+ checkmate :: assert_character(datasets_selected )
146149 checkmate :: assert_character(parent_dataname , min.len = 0 , max.len = 1 )
147150 ggtheme <- match.arg(ggtheme )
148151
@@ -158,9 +161,11 @@ tm_missing_data <- function(label = "Missing data",
158161 assert_decorators(decorators , null.ok = TRUE , names = available_decorators )
159162 # End of assertions
160163
164+ datasets_selected <- unique(datasets_selected )
161165 ans <- module(
162166 label ,
163167 server = srv_page_missing_data ,
168+ datanames = if (length(datasets_selected ) == 0 ) " all" else datasets_selected ,
164169 server_args = list (
165170 parent_dataname = parent_dataname ,
166171 plot_height = plot_height ,
@@ -170,7 +175,6 @@ tm_missing_data <- function(label = "Missing data",
170175 decorators = decorators
171176 ),
172177 ui = ui_page_missing_data ,
173- datanames = " all" ,
174178 ui_args = list (pre_output = pre_output , post_output = post_output )
175179 )
176180 attr(ans , " teal_bookmarkable" ) <- TRUE
0 commit comments