Description Usage Arguments Value Examples
Compiles all Module UI files into the desired layout.fun
using do.call()
, keeping your app.R
file tidy.
This can be run within ui.R
, shinyUI()
, or renderUI()
, just like any other Shiny UI element.
1 |
module.dir |
Path to directory that contains modules (child directories) |
module.file |
Name of file found within module directories that contains UI code |
numbered |
If |
layout.fun |
Any Shiny UI function that leverages |
... |
Additional arguments to be passed to the supplied |
A Shiny UI object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # app.R
# Create a UI object and render it
## Not run:
server <- function(input, output, session) {
output$appUI <- renderUI({
modularUI(
module.dir = file.path('.', 'modules'),
module.file = 'ui.R',
layout.fun = navbarPage,
title = 'My Modular App'
)
})
}
ui <- uiOutput('appUI')
shinyApp(ui, server)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.