0
ui <- fluidPage(
  selectInput(
    "select_id",
    "Select Name",
    choices = c("A", "B", "C"),
    selected = NULL,
    multiple = TRUE
  ),
)

server <- function(input, output, session) {
  # how to get the choices here?
}

shiny::shinyApp(ui = ui, server = server) 

所以问题是有没有办法从服务器功能中获得选择?

编辑:

我不能将选择作为全局向量,因为它是动态的,并且最初不知道它们是什么。它们是在应用程序启动后计算的。

4

0 回答 0