我有一个选择输入如下:
UI.R
ui <- fluidPage(
selectInput("state", "State",choices=c("within becnhamrk","out of Benchmark")),
selectInput("Action","Actions",choices=c("choose number of wokers precisely","choose arbitrarily the amount workers","Use Experinced supplier","Use The nearest Supplier")),
fileInput('file2', 'Upload Probability Matrix',accept=c('.csv','.xlsx')),
actionButton("submit6", "Add",icon = icon("plus-circle"),class = "btn-primary")
)),
我希望获得具有Id状态的selectInput的所有选择,并将其另存为单独的向量。
Server.R
observe({
states<-reactive({
c(input$state)})
})
如何在没有用户选择的情况下保存矢量中的所有状态选择?