Usage
example_module(
label = "example teal module",
datanames = "all",
transformators = list(),
decorators = NULL
)
Arguments
- label
(
character(1)
) Label shown in the navigation item for the module or module group. Formodules()
defaults to"root"
. SeeDetails
.- datanames
-
(
character
) Names of the datasets relevant to the item. There are 2 reserved values that have specific behaviors:The keyword
"all"
includes all datasets available in the data passed to the teal application.NULL
hides the sidebar panel completely.If
transformators
are specified, theirdatanames
are automatically added to thisdatanames
argument.
- transformators
(
list
ofteal_transform_module
) that will be applied to transformator module's data input.- decorators
(
list
ofteal_transform_module
orNULL
) optional, if notNULL
, decorator for tables or plots included in the module.
Value
A teal
module which can be included in the modules
argument to init()
.
Details
This module creates an object called object
that can be modified with decorators.
The object
is determined by what's selected in Choose a dataset
input in UI.
The object can be anything that can be handled by renderPrint()
.
See the vignette("decorate-modules-output", package = "teal")
or teal_transform_module
to read more about decorators.
Examples
app <- init(
data = teal_data(IRIS = iris, MTCARS = mtcars),
modules = example_module()
)
if (interactive()) {
shinyApp(app$ui, app$server)
}