当使用带有 shinyDashboard 的 runApp() 时,应用程序默认加载第一个选项卡。有什么方法可以将第一页更改为“欢迎”之类的内容,而不是直接加载第一个选项卡?
问问题
1089 次
1 回答
0
You can add an updateTabItems
command in your server.R
If you want it to fire when the application starts you'll want to put it inside an observe
observe({
updateTabItems(session, "menuTabId", 'tabIdToChangeTo')
})
If you want this functionality to repeat depending on some value, you'll want to add a reactive input or reactive value inside the observe scope to trigger the observe
once that value changes.
于 2016-01-14T20:39:27.270 回答