我希望能够创建多个页面,每个页面都有一组小部件下拉列表、单选按钮和一个用于绘制地图的空间。 Shiny 教程展示了如何创建多个页面
shinyUI(navbarPage("My Application",
tabPanel("Component 1"),
tabPanel("Component 2"),
tabPanel("Component 3")
))
如何在每个页面中添加小部件,例如如何将以下内容添加到组件 1 中?
sidebarLayout(
sidebarPanel(
selectizeInput(
'id', label = "Year", choices = NULL,multiple=FALSE,selected="X2015",
options = list(create = TRUE,placeholder = 'Choose the year')
),
# Make a list of checkboxes
radioButtons("radio", label = h3("Radio buttons"),
choices = list("Choice 1" = 1,
"Choice 2" = 2)
and
mainPanel(
plotOutput("distPlot")
)