使用 Rstudio 实时预览 Rmarkdown 文档

编程入门 行业动态 更新时间:2024-10-11 15:20:41
本文介绍了使用 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 文档

本文发布于:2023-11-28 12:18:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642367.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:实时   文档   Rstudio   Rmarkdown

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!