naruto

tl;dr -> open demo xaringan presentation

The Xaringan R package1 is an extension of the Rmarkdown2 markup language. It allows you to create HTML5 presentations. HTML5 presentations showed in web browsers, but they can also be exported to PDF format and viewed in a PDF reader. They work both online and offline. Behind the scenes, Xaringan is powered by the remark.js JavaScript extension, which can be used on its own if you have sufficient knowledge of the JavaScript programming language. Xaringan “merely” makes things easier for those who are familiar with the RMarkdown3 markup language and have some knowledge of web programming (CSS, HTML, JS). So you have to be a “ninja” a little bit.

The name Xaringan [ʃaː.’riŋ.gan] comes from the world of Japanese manga, specifically the animated series Naruto. Yihui Xie, the program’s developer, borrows technical terms from there, such as “chakra,” which refers to the path of remark.js in the file system or in the cloud (online).

“The Sharingan is an ability that allows a ninja to copy, by mere sight, their opponents’ techniques while gaining incredible reflexes and perceptive abilities.” - Urban Dictionary

Some useful features of Xaringan:

  • funny (okay, this isn’t really that useful) - built-in random memes (cf. yolo parameter)
  • online and offline presentations
  • pdf output with other packages (e.g. pagedown) or system tools (See details here.).

Open pdf presentation here

  • presenter notes with timer options
  • built-in css themes
```{r, eval = FALSE}
# install
install.packages("xaringan")
# list available theme (+font) names
names(xaringan:::list_css())
```
  • incremental rendering, “reveal”
  • autoplay (and countdown timer)
  • MathJax for displaying mathematical content

    \[\sigma=\sqrt{\frac{1}{n}\sum_{i=1}^n(x_i-\mu)^2)}\]
  • Executable code chunks
```{r, eval=TRUE}
head(iris)
```

See full documentation at Yihui Xie’s Presentation Ninja and my demo here.

References

  1. Xie Y (2025). xaringan: Presentation Ninja. doi:10.32614/CRAN.package.xaringan https://doi.org/10.32614/CRAN.package.xaringan, R package version 0.31, https://CRAN.R-project.org/package=xaringan

  2. Yihui Xie, J. J. Allaire, Garrett Grolemund. 2026-02-03. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman & Hall/CRC. 

  3. Xie Y, Dervieux C, Riederer E (2020). R Markdown Cookbook. Boca Raton, Florida: Chapman and Hall/CRC.