将RStudio演示文稿(.Rpres)转换为rmarkdown演示文稿(.Rmd)

编程入门 行业动态 更新时间:2024-10-11 21:32:09
本文介绍了将RStudio演示文稿(.Rpres)转换为rmarkdown演示文稿(.Rmd)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当前似乎有两种方法可以在R中进行演示:

Currently there seem to be two ways to do presentations in R:

  • RStudio演示文稿,扩展名为 .Rpres / li>
  • rmarkdown ,并带有。Rmd 扩展
  • RStudio presentations, with .Rpres extension
  • rmarkdown, with .Rmd extension

对我来说,后者似乎更强大。输入格式非常相似,但不完全相同。我正在考虑将RStudio演示文稿转换为rmarkdown。最好的方法是什么?转换回来如何?

To me, it looks like the latter is slightly more powerful. The input format is very similar, yet not identical. I'm thinking about converting an RStudio presentation to rmarkdown. What's the best way to do this? How about the conversion back?

在那一点上,我真的很想在RStudio中看到rmarkdown演示的面板内预览,就像RStudio演示一样。我想知道为什么未实现该功能-预览会强制显示在模式窗口中。技术问题?

On that note, I'd really like to see an "in-pane" preview for rmarkdown presentations in RStudio, just like for RStudio presentations. I wonder why this isn't implemented -- the preview forcibly shows up in a modal window. Technical issues?

推荐答案

要从.Rpres更改为.Rmd,您需要更改文件扩展名(简单),并且需要更改

To change from .Rpres to .Rmd you need to change file extension (easy) and the front matter of the markdown document (slightly more involved).

一个.Rpres文件将最重要的内容放在第一张幻灯片上:

A .Rpres file places the front matter on the first slide:

Untitled ============================= author: Your Name Here date: 4 July, 2015

while a .Rmd document places the front matter in a special block:

--- title: "Untitled" author: "Your Name Here" date: "04 July, 2015" output: ioslides_presentation ---

其余的演示代码保留在 rmarkdown 中,并且只需很少的工作即可转换。

The rest of your presentation code remains in rmarkdown, and should require minimal work to convert.

我可以立即想到的某些例外情况

Some exceptions that I can think of immediately include

  • ioslides / slidify不支持通过 *** (真可惜,因为这是如此
  • Rpres不支持引用和书目(也很可惜)
  • ioslides/slidify don't support columns via *** (a real shame, as this is so convenient)
  • Rpres doesn't support citations and a bibliography (also a shame)

此外,在进行转换时,您将需要查找任何仅由一个框架支持的特殊CSS或其他指令。

Additionally, when converting you will need to look for any speciall CSS or other directives that are only supported by one framework.

更多推荐

将RStudio演示文稿(.Rpres)转换为rmarkdown演示文稿(.Rmd)

本文发布于:2023-10-31 10:45:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545850.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:演示文稿   转换为   RStudio   Rpres   Rmd

发布评论

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

>www.elefans.com

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