我正在尝试使用多个选项卡,每个选项卡都有自己的侧边栏,我需要selectInput在第一个选项卡和sliderInput第二个选项卡中.
有人可以帮忙吗?
我的代码:
ui <- fluidPage(
headerPanel("Terrorism in The World"),
sidebarPanel(
selectInput("Country", "Select Country", choices = sort(unique(mydat$Country)), selected = "Iraq")
,sliderInput("year", "Year:", min = 1968, max = 2009, value = 2009, sep='')
),
mainPanel(
tabsetPanel(
tabPanel("Map",htmlOutput("Attacks")),
tabPanel("plot",
fluidRow(
column(8, plotlyOutput("trendheatrPlot", height = "300px",width = 700)),
column(7, plotlyOutput("trendstakbarPlot", height = "300px",width = 700))
)
)
)
)
)
Run Code Online (Sandbox Code Playgroud)