Rmarkdown

Reproducing PowerPoint templates in Xaringan

I recently read this tweet from @apreshill that linked to some slides by datalorax covering how to make custom themes for Xaringan, my favorite Rmarkdown presentation package. They’re really good slides and I highly recommend flipping through them. @datalorax even has a package in development called slidex that converts the content of a PowerPoint to Rmarkdown, but what about the theme? I don’t have a magic package to solve this issue, but I thought I’d outline some steps I use to re-create PowerPoint themes in Xaringan.

Using rmarkdown parameters to set title, author, and date

Another quick tip today. I’m taking a look at a bunch of my Rmarkdown documents for places I can employ parameters. For reports and other templates, you might want to parameterize the YAML header that defines the title, author, date, etc. Turns out this is more straightforward than I guessed. You just need to define the parameters near the top of the YAML, then assign them to the appropriate elements later on.