Variable Browser Teal Module
tm_variable_browser.Rd
The 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),
pre_output = NULL,
post_output = NULL,
ggplot2_args = teal.widgets::ggplot2_args()
)
Arguments
- label
(
character
) Label shown in the navigation item for the module.- 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.- 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_args
and 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
library(scda)
ADSL <- synthetic_cdisc_data("latest")$adsl
ADTTE <- synthetic_cdisc_data("latest")$adtte
app <- init(
data = cdisc_data(
cdisc_dataset("ADSL", ADSL, code = "ADSL <- synthetic_cdisc_data(\"latest\")$adsl"),
cdisc_dataset("ADTTE", ADTTE, code = "ADTTE <- synthetic_cdisc_data(\"latest\")$adtte"),
check = TRUE
),
modules(
tm_variable_browser(
label = "Variable browser",
ggplot2_args = teal.widgets::ggplot2_args(labs = list(subtitle = "Plot generated by Variable Browser Module")),
)
)
)
#> [INFO] 2022-06-14 17:42:56.1888 pid:1110 token:[] teal.modules.general Initializing tm_variable_browser
if (FALSE) {
shinyApp(app$ui, app$server)
}