【发布时间】:2026-01-05 02:50:01
【问题描述】:
如何从 r markdown selectInput 下拉菜单中提取选定的选项?我的网页上有响应式输入,如下所示:
aggdata <- data.frame(
"Experiment" = c("One","Two","Three"),
"AnythingElse" = c(1,2,3)
)
selectInput("Experiment1","Choose the first experiment",
choices = unique(aggdata$Experiment),
selected = unique(aggdata$Experiment)[1])
reactiveData <- reactive(as.data.frame(subset(aggdata, Experiment == input$Experiment1)))
firstExperiment_aggData <- reactive(reactiveData())
我想在文本的某个地方响应式地写下用户的选择。你碰巧知道吗,我该怎么做。非常感谢。
【问题讨论】:
标签: r r-markdown shiny shinydashboard