
Last chance! 50% off unlimited learning
Sale ends in
Show UI output in viewer pane
view_ui(x, close_after = 5)
ui content (actionButton, selectInput, valueBox), if x is not provided, view_ui()
will look for selected text in the source pane or the last output from running the UI code. In the latter case, it expects an object with class "shiny.tag" or "shiny.tag.list"
number of seconds to display UI in Viewer panel. If NULL, app must be stopped manually before more code can be run.
# NOT RUN {
if (interactive()) {
# run this line
shiny::selectInput(
"state",
"Choose a state:",
list(
`East Coast` = list("NY", "NJ", "CT"),
`West Coast` = list("WA", "OR", "CA"),
`Midwest` = list("MN", "WI", "IA")
)
)
# the output will automatically be used here
view_ui(close_after = 6)
}
# }
Run the code above in your browser using DataLab