2
從shinyBS發出的動態彈出窗口只會在每第二次選擇時亮起。從shinyBS閃爍的彈出式窗口僅顯示每秒第二次
library(shiny)
library(shinyBS)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
selectInput("poppy", "Think!", c("A", "B", "C", "D")),
bsButton("dummy", "dummy")), ## required, dummy
mainPanel(
helpText("Note that when you select from the box, popover turns up every second time only!")
)))
server <- function(input, output, session) {
observe({
poppy = paste("You selected ", input$poppy)
addPopover(session, "poppy", "Every second time", poppy)
})}
shinyApp(ui = ui, server = server)
作品一種享受。只需要記住將.js文件放在www文件夾中。 –