Как использовать визуализацию rmarkdown для визуализации презентации ioslides? - PullRequest
0 голосов
/ 30 октября 2019

Итак, у меня есть базовый шаблон с параметрами для презентации ioslides. Прямо сейчас я отрисовываю его с помощью кнопки knit в rstudio, но я хочу изменить его и использовать:

 rmarkdown::render(input = rmd_file,
                    output_file = file.path(dirname(rmd_file), output_file),
                    output_format = "html_document",
                    output_dir = paste0(getwd(), "/", output_folder),
                    params = params,
                    encoding = "utf-8",
                    envir = new.env(parent = globalenv()))

Но выходной файл выглядит как простой рендер html и не имеет формата представления.

---
title: "Untitled"
author: "MS"
date: "30 10 2019"
output: ioslides_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
#``` (this comment is here to add stackoverflow formating only)

## R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

## Slide with R Output

```{r cars, echo = TRUE}
summary(cars)


## Slide with Plot

```{r pressure}
plot(pressure)

1 Ответ

0 голосов
/ 30 октября 2019

Мне удалось заставить его рендериться на ioslides как в RStudio, так и в браузере, изменив YAML на:

---
title: "Untitled"
author: "MS"
date: "30 10 2019"
output:
  ioslides_presentation: default
  html_document: null
---

Надеюсь, это полезно для вас.

...