View source: R/module_source_code.R
| disable_src | R Documentation |
Convenience function that disables the user's ability to see the code of the module.
disable_src(x)
x |
( |
This is equivalent to setting the attribute teal.enable_src to FALSE on the
data object returned by the module.
modified data object that indicates that it should not show the "Show R Code" button in the UI.
disable_report()
# 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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.