Convenience function that disables the user's ability to see the code of the module.
Value
modified data object that indicates that it should not show the "Show R Code" button in the UI.
Details
This is equivalent to setting the attribute teal.enable_src to FALSE on the
data object returned by the module.
Examples
# Disabling source on a single module
app <- init(
data = within(teal_data(), iris <- iris),
modules = modules(
example_module(label = "example teal module") |> disable_src()
)
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
# Multiple modules
app <- init(
data = within(teal_data(), iris <- iris),
modules = modules(
example_module(label = "example 1"),
example_module(label = "example 2")
) |> disable_src()
)
if (interactive()) {
shinyApp(app$ui, app$server)
}