小编Saz*_*man的帖子

每个标签中都有多个标签和不同侧边栏

我正在尝试使用多个选项卡,每个选项卡都有自己的侧边栏,我需要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)

tabs r shiny

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

r ×1

shiny ×1

tabs ×1