7.1 Get started
You can install either the CRAN version or the development version on GitHub (https://github.com/yihui/xaringan):
# install from CRANinstall.packages('xaringan')# or GitHubdevtools::install_github('yihui/xaringan')If you use RStudio, it is easy to get started from the menuFile -> New File -> R Markdown -> From Template -> Ninja Presentation, and you will see an R Markdown example in the editor. Press theKnit button to compile it, or use the RStudio addinInfinite 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 ismoon_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: libsnature:highlightStyle: githubcountIncrementalSlides:false---One slide.---Another slide.