Skip to contents

[Experimental]

Usage

example_module(
  label = "example teal module",
  datanames = "all",
  transformers = list()
)

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

transformers

(list of teal_data_module) that will be applied to transform the data. Each transform module UI will appear in the teal's sidebar panel. Transformers' datanames are added to the datanames. See teal_transform_module().

Value

A teal module which can be included in the modules argument to init().

Examples

app <- init(
  data = teal_data(IRIS = iris, MTCARS = mtcars),
  modules = example_module()
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}