tm_variable_browser {teal.modules.general} | R Documentation |
teal
module: Variable browser
Description
Module provides provides a detailed summary and visualization of variable distributions
for data.frame
objects, with interactive features to customize analysis.
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 |
( |
datasets_selected |
( |
parent_dataname |
( |
pre_output |
( |
post_output |
( |
ggplot2_args |
( For more details see the vignette: |
Details
Numeric columns with fewer than 30 distinct values can be treated as either discrete or continuous with a checkbox allowing users to switch how they are treated(if < 6 unique values then the default is discrete, otherwise it is continuous).
Value
Object of class teal_module
to be used in teal
applications.
Examples
library(teal.widgets)
# Module specification used in apps below
tm_variable_browser_module <- tm_variable_browser(
label = "Variable browser",
ggplot2_args = ggplot2_args(
labs = list(subtitle = "Plot generated by Variable Browser Module")
)
)
# general data example
data <- teal_data()
data <- within(data, {
iris <- iris
mtcars <- mtcars
women <- women
faithful <- faithful
CO2 <- CO2
})
datanames(data) <- c("iris", "mtcars", "women", "faithful", "CO2")
app <- init(
data = data,
modules = modules(tm_variable_browser_module)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
# CDISC example data
data <- teal_data()
data <- within(data, {
ADSL <- rADSL
ADTTE <- rADTTE
})
datanames(data) <- c("ADSL", "ADTTE")
join_keys(data) <- default_cdisc_join_keys[datanames(data)]
app <- init(
data = data,
modules = modules(tm_variable_browser_module)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}