R Shiny: includeMarkdown cannot render htmlwidgets

妖精的绣舞 提交于 2020-01-11 13:11:49

问题


This rmd file render ok to html, but the output is empty in shiny. Same problem with other htmlwidets like chartJSRadar

file.rmd:

---
title: "test"
output: html_document 
--- 

```{r}  
rpivotTable::rpivotTable(data.frame(a = c(1:10) ) , rows = 'a'    )
```

the htmlwidget is missing in this shiny app

ui <- shinyUI(
  fluidPage(
    includeMarkdown('file.rmd')
  )
) 
server <- function(input, output) { }  
shinyApp(ui, server)

This question is related to this one


回答1:


Answering my own question. The code in includeMarkdown is not be executed by knitr.



来源:https://stackoverflow.com/questions/39171890/r-shiny-includemarkdown-cannot-render-htmlwidgets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!