Shiny r标记多个页面

Shiny r标记多个页面,shiny,r-markdown,shiny-server,Shiny,R Markdown,Shiny Server,我尝试了以下代码来显示多页 资料来源: 对于index.Rmd ```{r, echo = FALSE} library(shiny) selectInput("dataset", "Choose Dataset:", c("cars", "iris", "mtcars")) renderTable({ head(mtcars, 5) }) ``` [Another Shiny Do

我尝试了以下代码来显示多页 资料来源:

对于index.Rmd

```{r, echo = FALSE}

library(shiny)

selectInput("dataset", "Choose Dataset:", c("cars", "iris", "mtcars"))

renderTable({

head(mtcars, 5)

})

```

[Another Shiny Document](index2.Rmd)
对于index2.Rmd

```{r, echo = FALSE}
library(shiny)
selectInput("dataset2", "Choose Dataset:", c("cars", "iris", "mtcars"))

activeDataset2 <- reactive({
get(input$dataset2, pos="package:datasets", inherits=FALSE)
})

renderPlot({
plot(activeDataset2())
})
```
看起来闪亮的服务器只能正确地显示index2.Rmd,问题出在哪里?谢谢你的帮助

使现代化
index.Rmd出现问题,现在有两个文件按预期运行。

选择输入仅引用字符串,例如iris。如果你有一个R对象的名称,你仍然需要在使用它之前“获取”它。谢谢,我意识到我的原始代码中有一个问题