使用 Rstudio 实时预览 Rmarkdown 文档 [英] Live preview for Rmarkdown documents using Rstudio

查看:194
本文介绍了使用 Rstudio 实时预览 Rmarkdown 文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用 VScode 作为记笔记的主要 Markdown 平台,而且我真的习惯了实时预览功能.

I have been using VScode as my main markdown platform for notetaking and I got really used to the live preview capabilities.

现在我必须使用 Rmarkdown 生成可更新的报告,我想知道是否有人知道如何使用 Rstudio 生成实时预览.

Now I have to use Rmarkdown to generate an updatable report and I would like to know if anyone knows how to generate live previews using Rstudio.

我对有关 R 和 Rmarkdown 的 Vscode 扩展不满意.Visual Studio Rtools 实际上有实时预览功能,但与 Rstudio 相比,IDE 速度要慢得多,优化程度也更低(在我看来).

I am not happy with Vscode extensions regarding R and Rmarkdown. Visual Studio Rtools does in fact have a live preview but the IDE is a lot slower and less optimized (in my opinion) when compared to Rstudio.

请注意,我知道如何编织,我希望避免每次需要检查文档时编织.

Notice that i know how to knit, what i would like would be to avoid knitting everytime i need to check the document.

提前致谢

推荐答案

对于 HTML 输出,您可以使用 xaringan::infinite_moon_reader(file).在此之后,文件将在保存时自动处理.从它的文档:

For HTML output you can use xaringan::infinite_moon_reader(file). After this, the file will automatically be processed on saving it. From it's documentation:

注意

这个函数并没有真正绑定到输出格式moon_reader().您可以使用它来提供任何单个 HTML 文件的 R Markdown输出.

This function is not really tied to the output format moon_reader(). You can use it to serve any single-HTML-file R Markdown output.

这篇关于使用 Rstudio 实时预览 Rmarkdown 文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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