在闪亮的应用程序中调用 Rmarkdown 报告 [英] Call a Rmarkdown report in the shiny application

查看:46
本文介绍了在闪亮的应用程序中调用 Rmarkdown 报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个闪亮的应用程序,它读取 csv 文件并清理数据并添加几列,......(我使用了 此示例 以创建应用程序).最后,应用程序将清理后的数据 (output.csv) 保存在应用程序文件夹内的 log 文件夹中.

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.

我还设计了一个位于闪亮应用程序文件夹中的 Rmd 文件.Rmd 文件使用输出文件 (log/output.csv).

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

我想在保存 (output.csv) 后调用 Rmd 文件来显示报告,我该怎么做?

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

推荐答案

我找到了如下解决方案.只需在您的应用程序中包含以下代码行:

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")
  })

这篇关于在闪亮的应用程序中调用 Rmarkdown 报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆