Call a Rmarkdown report in the shiny application

两盒软妹~` 提交于 2019-12-21 06:26:31

问题


I have a shiny application that read a csv file and clean the data and add few columns, ... (I used this example to create the app). At the end the application save the cleaned data (output.csv) in the log folder within the application folder.

I also design a Rmd file which is in the shiny application folder. The Rmd file uses the output file (log/output.csv).

I would like to call the Rmd file to show the report after saving the (output.csv), How can I do it?


回答1:


I found the solution as follow. Just include the following code lines in your application:

uo.R:

mainPanel(
      uiOutput("report")
    )

server.R:

output$report <- renderUI({
    includeMarkdown("Report1.Rmd")
  })


来源:https://stackoverflow.com/questions/36472001/call-a-rmarkdown-report-in-the-shiny-application

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