当前似乎有两种方法可以在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)
发布评论