Skip to contents

[Experimental]

Usage

merge_levels_transformator(dataname)

Arguments

dataname

(character(1)) the name of the dataset which columns will be used for possible transformation.

Details

This transformator allows the user to select a column from the dataset and combine values of this column into a single level. Only selected levels are affected.

The new combined level is called "Combined".

Merging works only for character or factor columns.

Examples


app <- teal::init(
  data = teal.data::teal_data(IRIS = iris, code = "IRIS <- iris"),
  modules = teal::modules(
    teal::example_module(
      transformators = list(merge_levels_transformator("IRIS"))
    )
  )
)
if (interactive()) {
  shiny::shinyApp(app$ui, app$server)
}