javascript
shiny html5代码,javascript – Shiny:如何正确包含Shiny HTML
我想在一個Shiny應(yīng)用程序中包含一個從Rmd生成的交互式文檔.問題是Rmd包含兩個Shiny應(yīng)用程序.
這是.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應(yīng)用程序
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')"
并將其移動到外部應(yīng)用程序的同一文件夾中.
當我從RStudio運行它時一切正常.但是當我在ubuntu服務(wù)器上移動它時,我得到了錯誤
Uncaught TypeError: Cannot read property 'filter' of undefined
在這條線上長大
var dynamicResults = results.filter(".html-widget-output");
數(shù)據(jù):application / x-javascript
總結(jié)
以上是生活随笔為你收集整理的shiny html5代码,javascript – Shiny:如何正确包含Shiny HTML的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html中的特性是什么,数据库的四大特性
- 下一篇: 2021开封高考个人成绩查询,开封召开2