Last chance! 50% off unlimited learning
Sale ends in
Renders reactive HTML using the Shiny UI library.
renderUI(expr, env = parent.frame(), quoted = FALSE,
outputArgs = list())
An expression that returns a Shiny tag object, HTML
,
or a list of such objects.
The environment in which to evaluate expr
.
Is expr
a quoted expression (with quote()
)? This
is useful if you want to save an expression in a variable.
A list of arguments to be passed through to the implicit
call to uiOutput
when renderUI
is used in an
interactive R Markdown document.
The corresponding HTML output tag should be div
and have the CSS class
name shiny-html-output
(or use uiOutput
).
# NOT RUN {
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
uiOutput("moreControls")
)
server <- function(input, output) {
output$moreControls <- renderUI({
tagList(
sliderInput("n", "N", 1, 1000, 500),
textInput("label", "Label")
)
})
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab