My current approach to preparing presentations for the ds-incubator
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 17
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Preparing presentations take time and one way to save some time is to create and reuse templates for the files that you need for producing the slides.
Here I share my approach to prepare presentations for the ds-incubator.
Bookdown
- I type some-file.Rmd file (usually with the format <yyy-mm-dd>_<topic>.Rmd) at the root of a bookdown project.
- I build the book into docs/ and host it on GitHub pages.
Slides
I render some-file.Rmd with render_ioslides("some-file.Rmd") to produce some-file.html, then print a .pdf from the web browser. I use the .html version while I speak, and store the .pdf version for the records (example).
render_ioslides()looks like this:
render_ioslides <- function(path, ...) {
stopifnot(!missing(path))
stopifnot(fs::file_exists("slides"))
tf <- fs::file_copy("slides", "slides.Rmd")
on.exit(fs::file_delete(tf))
rmarkdown::render(
input = tf,
output_format = "ioslides_presentation",
output_file = fs::path_ext_remove(path),
params = list(child = path),
...
)
}
render_ioslides()uses the file "slides" located at the root of the bookdown project. The "slides" file has no extension so it's ignored when bookdown builds the book. This is what "slides" look like:
---
title: "go to next slide"
params:
child: "placeholder"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = TRUE,
comment = "#>",
error = TRUE,
collapse = TRUE
)
```
```{r, child=params$child}
```
--
Thanks @cjyetman for motivating this post.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the issue and the referenced R/render_ioslides.R entry point, then review the root-level slides template and the linked GitHub Pages example. The issue shares an approach but does not specify a requested documentation change or a completion criterion, so confirm the intended outcome before starting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, r
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100