【发布时间】:2015-10-26 19:13:59
【问题描述】:
我第一次创建 R Markdown 文档,我想在一个文档中呈现 Markdown 文本以及闪亮的组件,但我不知道如何在 Markdown 和 Shiny 之间交换对象 - 有什么帮助吗?
---
runtime: shiny
output: html_document
---
```{r echo=FALSE}
subjects<-c(letters[1:20])
inputPanel(selectInput("subject_of_interest","",subjects))
selected_subject<-input$subject_of_interest # This is failing with error "Operation not allowed without an active reactive context. (You tried to do something that can only be done from inside a reactive expression or observer.)"
```
The selected subject `r selected_subject` is.....
我需要根据所选主题生成其他文本项。有什么办法吗?
【问题讨论】:
标签: r shiny r-markdown