7.1 Get started
You can install either the CRAN version or the development version on GitHub (https://github.com/yihui/xaringan):
# install from CRAN
install.packages('xaringan')
# or GitHub
::install_github('yihui/xaringan') devtools
If you use RStudio, it is easy to get started from the menu File -> New File -> R Markdown -> From Template -> Ninja Presentation
, and you will see an R Markdown example in the editor. Press the Knit
button to compile it, or use the RStudio addin Infinite Moon Reader
to live preview the slides: every time you update and save the Rmd document, the slides will be automatically reloaded.
The main R Markdown output format in this package is moon_reader()
. See the R help page ?xaringan::moon_reader
for all possible configurations. Below is a quick example:
---
title: "Presentation Ninja"
subtitle: "with xaringan"
author: "Yihui Xie"
date: "2016/12/12"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
countIncrementalSlides: false
---
One slide.
---
Another slide.