Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Make RStudio Presentation Self-contained?

I'm writing a presentation in R using RStudio. To create new presentation, I select "R Presentation" from the File => New File menu. RStudio creates new document. Here is the template:

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)
```

Once a presentation is created, it can be saved as an HTML. However, I cannot find an option to make it a self-contained HTML file.

As a counter-example, I can create a self-contained HTML file using Rmarkdown:

---
title: "Habits"
output:
    ioslides_presentation:
      mathjax: local
      self_contained: false
---

Source: http://rmarkdown.rstudio.com/ioslides_presentation_format.html

What is the equivalent of this code in RStudio R Presentation?

Additionally, does anyone know why they did it both ways?

SOLVED (09/25/2017)! See Nova's answer below. Here is a screenshot to show how I did it:

enter image description here

like image 343
Davit Sargsyan Avatar asked Dec 05 '15 22:12

Davit Sargsyan


1 Answers

I've been able to "export" the presentation to html by going to the "Presentation" tab in RStudio, clicking the gear shift icon where it says "More", and choosing "Save as Webpage". This saved a stand-alone .html file that works when I open it from a different folder location.

like image 61
Nova Avatar answered Oct 24 '22 01:10

Nova