diff --git a/R/tm_g_ae_oview.R b/R/tm_g_ae_oview.R index 7cf35d0a..63e0beeb 100644 --- a/R/tm_g_ae_oview.R +++ b/R/tm_g_ae_oview.R @@ -6,6 +6,7 @@ #' Display the `AE` overview plot as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param flag_var_anl ([`teal.transform::choices_selected`]) #' `choices_selected` object with variables used to count adverse event @@ -77,7 +78,8 @@ tm_g_ae_oview <- function(label, flag_var_anl, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL) { + plot_width = NULL, + transformators = list()) { message("Initializing tm_g_ae_oview") checkmate::assert_class(arm_var, classes = "choices_selected") checkmate::assert_class(flag_var_anl, classes = "choices_selected") @@ -114,6 +116,7 @@ tm_g_ae_oview <- function(label, ), ui = ui_g_ae_oview, ui_args = args, + transformators = transformators, datanames = c("ADSL", dataname) ) } diff --git a/R/tm_g_ae_sub.R b/R/tm_g_ae_sub.R index 099d46d0..ee3c5024 100644 --- a/R/tm_g_ae_sub.R +++ b/R/tm_g_ae_sub.R @@ -6,6 +6,7 @@ #' Display the `AE` by subgroups plot as a teal module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param group_var (`choices_selected`) subgroups variables. See [teal.transform::choices_selected()] for details. #' @@ -54,7 +55,8 @@ tm_g_ae_sub <- function(label, group_var, plot_height = c(600L, 200L, 2000L), plot_width = NULL, - fontsize = c(5, 3, 7)) { + fontsize = c(5, 3, 7), + transformators = list()) { message("Initializing tm_g_ae_sub") checkmate::assert_class(arm_var, classes = "choices_selected") checkmate::assert_class(group_var, classes = "choices_selected") @@ -90,6 +92,7 @@ tm_g_ae_sub <- function(label, group_var = group_var, fontsize = fontsize ), + transformators = transformators, datanames = c("ADSL", dataname) ) } diff --git a/R/tm_g_butterfly.R b/R/tm_g_butterfly.R index d9651528..9e18e1c5 100644 --- a/R/tm_g_butterfly.R +++ b/R/tm_g_butterfly.R @@ -6,6 +6,7 @@ #' Display butterfly plot as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param filter_var (`choices_selected`) variable name of data filter, please see details regarding #' expected values, default is`NULL`.`choices` @@ -118,7 +119,8 @@ tm_g_butterfly <- function(label, plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, - post_output = NULL) { + post_output = NULL, + transformators = list()) { message("Initializing tm_g_butterfly") checkmate::assert_string(label) checkmate::assert_string(dataname) @@ -150,7 +152,8 @@ tm_g_butterfly <- function(label, server = srv_g_butterfly, server_args = list(dataname = dataname, label = label, plot_height = plot_height, plot_width = plot_width), ui = ui_g_butterfly, - ui_args = args + ui_args = args, + transformators = transformators ) } diff --git a/R/tm_g_events_term_id.R b/R/tm_g_events_term_id.R index 9a0ce0f2..92468958 100644 --- a/R/tm_g_events_term_id.R +++ b/R/tm_g_events_term_id.R @@ -6,6 +6,7 @@ #' Display Events by Term plot as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param term_var [teal.transform::choices_selected] object with all available choices #' and pre-selected option names that can be used to specify the term for events @@ -57,7 +58,8 @@ tm_g_events_term_id <- function(label, arm_var, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL) { + plot_width = NULL, + transformators = list()) { message("Initializing tm_g_events_term_id") checkmate::assert_string(label) checkmate::assert_class(term_var, classes = "choices_selected") @@ -90,6 +92,7 @@ tm_g_events_term_id <- function(label, server_args = list(label = label, dataname = dataname, plot_height = plot_height, plot_width = plot_width), ui = ui_g_events_term_id, ui_args = args, + transformators = transformators, datanames = c("ADSL", dataname) ) } diff --git a/R/tm_g_heat_bygrade.R b/R/tm_g_heat_bygrade.R index 602bdc8f..b253627b 100644 --- a/R/tm_g_heat_bygrade.R +++ b/R/tm_g_heat_bygrade.R @@ -6,6 +6,7 @@ #' Display the heatmap by grade as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param sl_dataname (`character`) subject level dataset name, #' needs to be available in the list passed to the `data` @@ -129,7 +130,8 @@ tm_g_heat_bygrade <- function(label, conmed_var = NULL, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL) { + plot_width = NULL, + transformators = list()) { message("Initializing tm_g_heat_bygrade") args <- as.list(environment()) @@ -178,6 +180,7 @@ tm_g_heat_bygrade <- function(label, ), ui = ui_g_heatmap_bygrade, ui_args = args, + transformators = transformators, datanames = "all" ) } diff --git a/R/tm_g_patient_profile.R b/R/tm_g_patient_profile.R index 2f927cef..22ca8dbe 100644 --- a/R/tm_g_patient_profile.R +++ b/R/tm_g_patient_profile.R @@ -6,6 +6,7 @@ #' Display patient profile plot as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param patient_id (`choices_seleced`) unique subject ID variable #' @param sl_dataname (`character`) subject level dataset name, @@ -151,7 +152,8 @@ tm_g_patient_profile <- function(label = "Patient Profile Plot", plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, - post_output = NULL) { + post_output = NULL, + transformators = list()) { args <- as.list(environment()) checkmate::assert_string(label) checkmate::assert_string(sl_dataname) @@ -201,6 +203,7 @@ tm_g_patient_profile <- function(label = "Patient Profile Plot", plot_height = plot_height, plot_width = plot_width ), + transformators = transformators, datanames = "all" ) } diff --git a/R/tm_g_spiderplot.R b/R/tm_g_spiderplot.R index ee7e7d01..21098013 100644 --- a/R/tm_g_spiderplot.R +++ b/R/tm_g_spiderplot.R @@ -6,6 +6,7 @@ #' Display spider plot as a shiny module #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param x_var x-axis variables #' @param y_var y-axis variables @@ -93,7 +94,8 @@ tm_g_spiderplot <- function(label, plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, - post_output = NULL) { + post_output = NULL, + transformators = list()) { message("Initializing tm_g_spiderplot") checkmate::assert_class(paramcd, classes = "choices_selected") checkmate::assert_class(x_var, classes = "choices_selected") @@ -130,7 +132,8 @@ tm_g_spiderplot <- function(label, plot_width = plot_width ), ui = ui_g_spider, - ui_args = args + ui_args = args, + transformators = transformators ) } diff --git a/R/tm_g_swimlane.R b/R/tm_g_swimlane.R index ff6564fe..42ff6644 100644 --- a/R/tm_g_swimlane.R +++ b/R/tm_g_swimlane.R @@ -6,6 +6,7 @@ #' This is teal module that generates a `swimlane` plot (bar plot with markers) for `ADaM` data #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param dataname analysis data used for plotting, needs to be available in the list passed to the `data` #' argument of [teal::init()]. If no markers are to be plotted in the module, `"ADSL"` should be @@ -120,7 +121,8 @@ tm_g_swimlane <- function(label, plot_width = NULL, pre_output = NULL, post_output = NULL, - x_label = "Time from First Treatment (Day)") { + x_label = "Time from First Treatment (Day)", + transformators = list()) { message("Initializing tm_g_swimlane") args <- as.list(environment()) @@ -165,6 +167,7 @@ tm_g_swimlane <- function(label, plot_width = plot_width, x_label = x_label ), + transformators = transformators, datanames = c("ADSL", dataname) ) } diff --git a/R/tm_g_waterfall.R b/R/tm_g_waterfall.R index e91df91e..8b3c1303 100644 --- a/R/tm_g_waterfall.R +++ b/R/tm_g_waterfall.R @@ -6,6 +6,7 @@ #' This is teal module that generates a waterfall plot for `ADaM` data #' #' @inheritParams teal.widgets::standard_layout +#' @inheritParams teal::module #' @inheritParams argument_convention #' @param dataname_tr tumor burden analysis data used in teal module to plot as bar height, needs to #' be available in the list passed to the `data` argument of [teal::init()] @@ -102,7 +103,8 @@ tm_g_waterfall <- function(label, plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, - post_output = NULL) { + post_output = NULL, + transformators = list()) { message("Initializing tm_g_waterfall") checkmate::assert_string(label) checkmate::assert_string(dataname_tr) @@ -145,6 +147,7 @@ tm_g_waterfall <- function(label, plot_height = plot_height, plot_width = plot_width ), + transformators = transformators, datanames = "all" ) } diff --git a/man/tm_g_ae_oview.Rd b/man/tm_g_ae_oview.Rd index 5b5319a0..e036afd2 100644 --- a/man/tm_g_ae_oview.Rd +++ b/man/tm_g_ae_oview.Rd @@ -11,12 +11,13 @@ tm_g_ae_oview( flag_var_anl, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL + plot_width = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{(\code{character(1)})\cr analysis data used in the teal module, needs to be @@ -41,6 +42,9 @@ vector to indicate default value, minimum and maximum values.} \item{plot_width}{(\code{numeric(3)})\cr vector to indicate default value, minimum and maximum values.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_ae_sub.Rd b/man/tm_g_ae_sub.Rd index e1219bf7..dfe6022f 100644 --- a/man/tm_g_ae_sub.Rd +++ b/man/tm_g_ae_sub.Rd @@ -11,12 +11,13 @@ tm_g_ae_sub( group_var, plot_height = c(600L, 200L, 2000L), plot_width = NULL, - fontsize = c(5, 3, 7) + fontsize = c(5, 3, 7), + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{(\code{character(1)})\cr analysis data used in the teal module, needs to be @@ -39,6 +40,9 @@ vector to indicate default value, minimum and maximum values.} Defines initial possible range of font-size. \code{fontsize} is set for \code{\link[teal.widgets:optionalSliderInputValMinMax]{teal.widgets::optionalSliderInputValMinMax()}} which controls font-size in the output plot.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_butterfly.Rd b/man/tm_g_butterfly.Rd index de60e798..abb0810f 100644 --- a/man/tm_g_butterfly.Rd +++ b/man/tm_g_butterfly.Rd @@ -20,12 +20,13 @@ tm_g_butterfly( plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, - post_output = NULL + post_output = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{(\code{character(1)})\cr analysis data used in the teal module, needs to be @@ -64,6 +65,9 @@ with text placed before the output to put the output into context. For example a \item{post_output}{(\code{shiny.tag}) optional, with text placed after the output to put the output into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_events_term_id.Rd b/man/tm_g_events_term_id.Rd index e3a81257..8f8c5a49 100644 --- a/man/tm_g_events_term_id.Rd +++ b/man/tm_g_events_term_id.Rd @@ -11,12 +11,13 @@ tm_g_events_term_id( arm_var, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL + plot_width = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{(\code{character(1)})\cr analysis data used in the teal module, needs to be @@ -40,6 +41,9 @@ vector to indicate default value, minimum and maximum values.} \item{plot_width}{(\code{numeric(3)})\cr vector to indicate default value, minimum and maximum values.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_heat_bygrade.Rd b/man/tm_g_heat_bygrade.Rd index 712160ec..81ab9917 100644 --- a/man/tm_g_heat_bygrade.Rd +++ b/man/tm_g_heat_bygrade.Rd @@ -18,12 +18,13 @@ tm_g_heat_bygrade( conmed_var = NULL, fontsize = c(5, 3, 7), plot_height = c(600L, 200L, 2000L), - plot_width = NULL + plot_width = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{sl_dataname}{(\code{character}) subject level dataset name, needs to be available in the list passed to the \code{data} @@ -66,6 +67,9 @@ vector to indicate default value, minimum and maximum values.} \item{plot_width}{(\code{numeric(3)})\cr vector to indicate default value, minimum and maximum values.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_patient_profile.Rd b/man/tm_g_patient_profile.Rd index d47fbd37..0076613f 100644 --- a/man/tm_g_patient_profile.Rd +++ b/man/tm_g_patient_profile.Rd @@ -25,12 +25,13 @@ tm_g_patient_profile( plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, - post_output = NULL + post_output = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{patient_id}{(\code{choices_seleced}) unique subject ID variable} @@ -87,6 +88,9 @@ with text placed before the output to put the output into context. For example a \item{post_output}{(\code{shiny.tag}) optional, with text placed after the output to put the output into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_spiderplot.Rd b/man/tm_g_spiderplot.Rd index 9e2e51a1..5fa605d1 100644 --- a/man/tm_g_spiderplot.Rd +++ b/man/tm_g_spiderplot.Rd @@ -21,12 +21,13 @@ tm_g_spiderplot( plot_height = c(600L, 200L, 2000L), plot_width = NULL, pre_output = NULL, - post_output = NULL + post_output = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{(\code{character(1)})\cr analysis data used in the teal module, needs to be @@ -67,6 +68,9 @@ with text placed before the output to put the output into context. For example a \item{post_output}{(\code{shiny.tag}) optional, with text placed after the output to put the output into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_swimlane.Rd b/man/tm_g_swimlane.Rd index 8a672d16..86961709 100644 --- a/man/tm_g_swimlane.Rd +++ b/man/tm_g_swimlane.Rd @@ -21,12 +21,13 @@ tm_g_swimlane( plot_width = NULL, pre_output = NULL, post_output = NULL, - x_label = "Time from First Treatment (Day)" + x_label = "Time from First Treatment (Day)", + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname}{analysis data used for plotting, needs to be available in the list passed to the \code{data} argument of \code{\link[teal:init]{teal::init()}}. If no markers are to be plotted in the module, \code{"ADSL"} should be @@ -71,6 +72,9 @@ with text placed before the output to put the output into context. For example a into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} \item{x_label}{the label of the x axis} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object. diff --git a/man/tm_g_waterfall.Rd b/man/tm_g_waterfall.Rd index 41a18191..bb90aa24 100644 --- a/man/tm_g_waterfall.Rd +++ b/man/tm_g_waterfall.Rd @@ -25,12 +25,13 @@ tm_g_waterfall( plot_height = c(1200L, 400L, 5000L), plot_width = NULL, pre_output = NULL, - post_output = NULL + post_output = NULL, + transformators = list() ) } \arguments{ -\item{label}{(\code{character(1)})\cr -menu item label of the module in the teal app.} +\item{label}{(\code{character(1)}) Label shown in the navigation item for the module or module group. +For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{dataname_tr}{tumor burden analysis data used in teal module to plot as bar height, needs to be available in the list passed to the \code{data} argument of \code{\link[teal:init]{teal::init()}}} @@ -90,6 +91,9 @@ with text placed before the output to put the output into context. For example a \item{post_output}{(\code{shiny.tag}) optional, with text placed after the output to put the output into context. For example the \code{\link[shiny:helpText]{shiny::helpText()}} elements are useful.} + +\item{transformators}{(\code{list} of \code{teal_transform_module}) that will be applied to transform module's data input. +To learn more check \code{vignette("data-transform-as-shiny-module", package = "teal")}.} } \value{ the \code{\link[teal:teal_modules]{teal::module()}} object.