Reputation: 497
So I have basic template with parameters for ioslides presentation. Right now i render it with knit button in rstudio but I want to change it and use:
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()))
But output file look like simple render html, and don't have presentation format.
---
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)
Upvotes: 0
Views: 348
Reputation: 1
In rmarkdown::render
, change the argument of the output_format
parameter to "ioslides_presentation" (instead of "html_document").
Upvotes: 0
Reputation: 4294
I was able to get it to render to ioslides in both RStudio and browser by changing the YAML to:
---
title: "Untitled"
author: "MS"
date: "30 10 2019"
output:
ioslides_presentation: default
html_document: null
---
Hope this is helpful to you.
Upvotes: 1