Description Usage Arguments Details Examples
Creates the boilerplate code for a Shiny module
1 | scaffold_module(app_dir, template, module_config, overwrite = FALSE)
|
app_dir |
Path to root directory of the Shiny app |
template |
Template to use for the module. Use |
module_config |
Configuration of the module in the form of a list, e.g.
|
overwrite |
Logical indicating whether existing module files should be
overwritten. Default is |
The function creates a directory in <APP_ROOT>/modules/<MODULE_ID>
in
which seperate files ui.R
, server.R
, global.R
,
utils.R
and help.R
are created. The files contain boilerplate
code to setup the module along with some basic examples to describe the usage
of the module. To include the module, the module's global.R
must be
sourced in the app's main global.R
and the module's UI and server
functions need to be called in the app's main ui.R
and
server.R
files.
1 2 3 4 5 | module_conf <- list(
id = "overview",
name = "Overview"
)
scaffold_module("app", "blankpage", module_conf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.