0
如何从r markdown selectInput下拉菜单中提取选定的选项?我有我的网页类似下面的反应输入:从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 Markdown。我如何在Markdown中做到这一点? – martinkabe
它记录在这里非常确切:http://rmarkdown.rstudio.com/authoring_shiny_advanced.html 而这里是另一个链接:http://rmarkdown.rstudio.com/authoring_shiny.html – nilsole
非常感谢你! ! – martinkabe