Skip to contents

[Experimental]

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. For modules() defaults to "root". See Details.

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, their datanames are automatically added to this datanames argument.

transformators

(list of teal_transform_module) that will be applied to transformator module's data input.

decorators

[Experimental] (list of teal_transform_module or NULL) optional, if not NULL, 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)
}