问题描述
我想显示我在R Shiny App中使用的当前标签。我已经在SO上查看了与此相关的问题,但是我无法使其正常工作。我以为我在做傻事。问题可能出在嵌套标签上?这是我的第一篇SO帖子,所以我竭尽所能。
先前的问题:
- How to use tabPanel as input in R Shiny?
- How do I access/print/track the current tab selection in a Shiny app?
library(shiny)
ui = navbarPage("My Shiny App",id = "Top Page",tabPanel(title = "My Tabs",tabsetPanel(type = "tabs",id = "tabset",tabPanel(title = "My First Tab",value = "tab_1",textoutput("mytab")),tabPanel(title = "My Second Tab",value = "tab_2",textoutput("mytab"))
)
)
)
server = function(input,output) {
output$mytab <- renderText({
paste("You are viewing tab: ",input$tabs)
})
}
shinyApp(ui = ui,server = server)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)