我想在一个Shiny应用程序中包含一个从Rmd生成的交互式文档.问题是Rmd包含两个Shiny应用程序.
这是.Rmd
# myInteractiveDocument.Rmd
...
```{r,echo=FALSE,eval=TRUE}
shinyAppDir('shiny_app_dir1',options=list(width= "100%",height=700))
```
...
```{r,echo=FALSE}
shinyAppDir('shiny_app_dir2')
```
这是外部Shiny应用程序
library(shiny)
# Define UI for application that draws a histogram
ui
...
mainPanel(
plotOutput("distPlot"),includeHTML("intro.html")
)
)
))
# Define server logic required to draw a histogram
server
...
# Run the application
shinyApp(ui = ui,server = server)
我这样做了:
我编译了Rmd文档
R -e "rmarkdown::render('myInteractiveDocument.Rmd')"
并将其移动到外部应用程序的同一文件夹中.
当我从RStudio运行它时一切正常.但是当我在ubuntu服务器上移动它时,我得到了错误
Uncaught TypeError: Cannot read property 'filter' of undefined
在这条线上长大
var dynamicResults = results.filter(".html-widget-output");
数据:application / x-javascript