Variable Browser Teal Module
tm_variable_browser.RdThe variable browser provides a table with variable names and labels and a plot that visualizes the content of a particular variable.
Usage
tm_variable_browser(
label = "Variable Browser",
datasets_selected = character(0),
parent_dataname = "ADSL",
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()
)Arguments
- label
(
character(1)) Label shown in the navigation item for the module. Any label possible except"global_filters"- read more inmappingargument of teal_slices.- datasets_selected
(
character) A vector of datasets which should be shown and in what order. Names in the vector have to correspond with datasets names. If vector of length zero (default) then all datasets are shown.- parent_dataname
(
character(1)) If thisdatanameexists indatasets_selectedthen an extra checkbox will be shown to allow users to not show variables in other datasets which exist in thisdataname. This is typically used to removeADSLcolumns inCDISCdata. In nonCDISCdata this can be ignored. Defaults to"ADSL".- pre_output
(
shiny.tag, optional)
with text placed before the output to put the output into context. For example a title.- post_output
(
shiny.tag, optional) with text placed after the output to put the output into context. For example theshiny::helpText()elements are useful.- ggplot2_args
-
(
ggplot2_args) object created byteal.widgets::ggplot2_args()with settings for the module plot. The argument is merged with options variableteal.ggplot2_argsand default module setup.For more details see the vignette:
vignette("custom-ggplot2-arguments", package = "teal.widgets")
Details
Numeric columns with fewer than 30 distinct values can be treated as either factors or numbers with a checkbox allowing users to switch how they are treated (if < 6 unique values then the default is categorical, otherwise it is numeric).
Examples
ADSL <- teal.modules.general::rADSL
ADTTE <- teal.modules.general::rADTTE
app <- teal::init(
data = teal.data::cdisc_data(
teal.data::cdisc_dataset("ADSL", ADSL, code = "ADSL <- teal.modules.general::rADSL"),
teal.data::cdisc_dataset("ADTTE", ADTTE, code = "ADTTE <- teal.modules.general::rADTTE"),
check = TRUE
),
modules(
teal.modules.general::tm_variable_browser(
label = "Variable browser",
ggplot2_args = teal.widgets::ggplot2_args(
labs = list(subtitle = "Plot generated by Variable Browser Module")
),
)
)
)
#> [INFO] 2023-08-14 13:51:40.8321 pid:1296 token:[] teal.modules.general Initializing tm_variable_browser
if (interactive()) {
shinyApp(app$ui, app$server)
}