Dav*_*yan 5 r presentation rstudio rpres
我正在使用 RStudio 在 R 中编写演示文稿。要创建新的演示文稿,我从文件 => 新建文件菜单中选择“R 演示文稿”。RStudio 创建新文档。这是模板:
New Presentation
========================================================
author:
date:
First Slide
========================================================
For more details on authoring R presentations click the
**Help** button on the toolbar.
- Bullet 1
- Bullet 2
- Bullet 3
Slide With Code
========================================================
```{r}
summary(cars)
```
Slide With Plot
========================================================
```{r, echo=FALSE}
plot(cars)
```
Run Code Online (Sandbox Code Playgroud)
创建演示文稿后,可以将其另存为 HTML。但是,我找不到使其成为独立 HTML 文件的选项。
作为反例,我可以使用 Rmarkdown 创建一个自包含的 HTML 文件:
---
title: "Habits"
output:
ioslides_presentation:
mathjax: local
self_contained: false
---
Run Code Online (Sandbox Code Playgroud)
来源:http : //rmarkdown.rstudio.com/ioslides_presentation_format.html
RStudio R Presentation 中这段代码的等价物是什么?
此外,有谁知道他们为什么这样做?
已解决(09/25/2017)!请参阅下面的 Nova 的回答。这是一个屏幕截图,显示我是如何做到的:
我已经能够通过转到 RStudio 中的“演示文稿”选项卡,单击显示“更多”的变速图标,然后选择“另存为网页”,将演示文稿“导出”为 html。这保存了一个独立的 .html 文件,当我从不同的文件夹位置打开它时,该文件就可以工作。