Skip to contents

Convenience function that disables the user's ability to add the module to the report previewer.

Usage

disable_report(x)

Arguments

x

(teal_module) a teal_module object.

Value

modified data object that indicates that it should disable the reporter functionality.

See also

Examples in Shinylive

example-1

Open in Shinylive

example-2

Open in Shinylive

example-3

Open in Shinylive

Examples

# Disabling report on a single module
app <- init(
  data = within(teal_data(), iris <- iris),
  modules = modules(
    example_module(label = "example teal module") |> disable_report()
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

# Disabling report on multiple modules
app <- init(
  data = within(teal_data(), iris <- iris),
  modules = modules(
    example_module(label = "example 1"),
    example_module(label = "example 2")
  ) |> disable_report()
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}
# Disabling reporting for the app
app <- init(
  data = within(teal_data(), iris <- iris),
  modules = modules(
    example_module(label = "example teal module")
  ),
  reporter = NULL
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}