Writing Presentations in R Markdown

Writing Presentations in R Markdown

R Markdown is a version of Markdown which lets you embed R (or other languages) and create presentations with ease. It provides you with an alternative to Powerpoint slides, Keynote or similar formats.

R Markdown Basics

We first mentioned a tutorial for R Markdown in 5 R Tutorials to Get You Started. You can use it to create presentations in many different formats using a version of Markdown known as Pandoc Markdown, embedding code, reactive charts, tables or almost anything else you can think of.

I first used it to create a simple presentation on Life as a Contractor which took about an hour to create after looking at a short tutorial with ioslides and html versions.

R Markdown is usually created from within R Studio, which is an open-source IDE (Interactive Development Environment) usually associated with R. It uses the knitr package, an engine for dynamic report generation with R. Can be used for things other than R Markdown.

Markdown itself is growing in popularity and acceptance among developers and other techies, for example in Github and other documentation. This blog post itself is in Markdown!

R Markdown can create presentations in many different formats, probably including your preferred format. My preferred one is HTML, or Markdown for Documentation. ioslides or Beamer. (HTML, PDF, websites) is very useful. The community has even created some of it's own formats.

What Makes it Special

R can be embedded straight into markdown as Code Chunks or Inline Code, letting you use any knowledge of R for embedding graphs, displaying stats and tables.

In addition to R, several other languages can embedded depending on your expertise. Prominent on the list are Python, SQL, Bash and JavaScript. as well as others.

Shiny allows you to create interactive components for visualisation, interactive plots or widgets, and these can be embedded into R Markdown. Here are some examples.

Html Widgets are another type of interactive document supported from within R Markdown, bringing data visualisation to R with a showcase of examples

Resources for R Markdown Presentations

There is a list of articles for R Markdown, most useful of which are a Cheat Sheet pdf and Reference Guide.

There is also a step by step guide from r-bloggers.com and a utorial on markdown and knitr from the same site. If videos are more your thing then take a look at an Introduction to R Markdown from YouTube.

Finally you can have a look at R Markdown on Github to see the latest on what is happening there!

Author

Duncan Thomson

A Remote Software and Database Contractor specialised in Umbraco, Duncan works from wherever he finds himself. He is the co-organiser of the Python Exeter and Data Science Exeter meetup groups and speaks about Remote Working, Umbraco, Python and .NET Outside of work he is keen on travel, random generation, foreign languages and good food.

comments powered by Disqus