How To Make A PowerPoint Presentation Using R Markdown

presentation in r markdown

PowerPoint is the most recognized presentation-making software, but it isn’t for everyone. Some may find it packed with unnecessary features, and to some extent that's true. Microsoft updates it regularly and invents things you never even knew you needed. If you’re a programmer at heart, you likely value simplicity. That’s where this article comes in. We’ll ditch PowerPoint and make presentations in a way you didn’t know was possible. After reading, you’ll know how to make an entire editable PowerPoint presentation using only R Markdown. <blockquote><strong>Interested in a real-world use case? <a href="https://appsilon.com/gxp-compliance-in-pharma-made-easier-good-documentation-practices-with-r-markdown-and-officedown/" target="_blank" rel="noopener noreferrer">Here’s how we applied R Markdown in Pharma</a>.</strong></blockquote> Table of contents: <ul><li><a href="#getting-started">Getting Started</a></li><li><a href="#basics">What Can You Do With Markdown?</a></li><li><a href="#advanced">Images, Tables, and Custom Layout</a></li><li><a href="#style">How to Style Your R Markdown Presentation</a></li><li><a href="#conclusion">Conclusion</a></li></ul> <hr /> <h2 id="getting-started">R Markdown PowerPoint Presentation - Getting Started</h2> We assume you have R and RStudio installed. Once in RStudio, go to <em>File</em> - <em>New File</em> - <em>R Markdown</em>. A window like the one below should appear: <img class="size-full wp-image-12097" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01ee7832c47d67312b3e1_creating-new-r-markdown-powerpoint-presentaiton.webp" alt="Image 1 - Creating a new R Markdown PowerPoint Presentation" width="2564" height="1758" /> Image 1 - Creating a new R Markdown PowerPoint Presentation Give your presentation a title and optionally specify the author. Also, make sure to select <em>PowerPoint</em> as the default output format. R will ask you to install a couple of dependencies if this is your first time working with R Markdown. After clicking on OK you’ll see a default R Markdown PowerPoint presentation code: <img class="size-full wp-image-12099" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01ee892a26c843b62e764_Default-presentation-template.webp" alt="Image 2 - Default presentation template" width="2564" height="1758" /> Image 2 - Default presentation template That’s great, but how can you “compile” it? Well, easily! Click on the <strong>Knit dropdown</strong> and choose the <em>Knit to PowerPoint</em> option: <img class="size-full wp-image-12107" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eea48b83fcd2e55b400_How-to-run-R-Markdown-PowerPoint-presentation.webp" alt="Image 3 - How to run R Markdown PowerPoint presentation" width="2564" height="1758" /> Image 3 - How to run R Markdown PowerPoint presentation That’s it! A PowerPoint presentation will be knitted and opened after a couple of seconds. Here’s what it looks like: <img class="size-full wp-image-12105" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eea2a228de4b21e9ac2_First-rendered-presentation.gif" alt="Image 4 - First rendered presentation" width="1314" height="898" /> Image 4 - First rendered presentation It’s a strong start but definitely needs work. I'll show you how to spice it up in the sections below. First, we’ll explore what can you actually do with Markdown. <h2 id="basics">What Can You Do With Markdown?</h2> Markdown is a free-to-use markup language used to format plain text. It’s popular among developers and technical writers because it provides you with everything you need and nothing else. We’ll now explore what can you do with R Markdown, and how you can do it. You’ll learn how to: <ul><li><strong>Style the text</strong> - Use italics, bold, strikeout, subscript, superscript, small caps, and verbatim.</li><li><strong>Lists</strong> - Ordered and unordered.</li><li><strong>Links</strong> - Embed URLs to external websites.</li><li><strong>Quotes</strong> - Special indentation for your text.</li><li><strong>Equations</strong> - Does LaTeX ring a bell? You can use it in Markdown.</li></ul> We’ll also cover more advanced Markdown functionality, but these are enough for one section. Use the following code to declare two slides with all mentioned Markdown functionalities: <script src="https://gist.github.com/darioappsilon/b2da95cfb87db52c2a49ba4ea3bb150a.js"></script> Your R Markdown file should look like this: <img class="size-full wp-image-12103" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eeb6bb6e6a6629bfa2b_Exploring-Markdown-options.webp" alt="Image 5 - Exploring Markdown options" width="2564" height="1758" /> Image 5 - Exploring Markdown options And once again, use <em>Knit to PowerPoint</em> option to export the PPTX: <img class="size-full wp-image-12109" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eec9506383404c4ec25_Rendered-markdown-presentation.gif" alt="Image 6 - Rendered markdown presentation" width="1314" height="898" /> Image 6 - Rendered markdown presentation The R Markdown PowerPoint presentation still looks rough around the edges, but we’ll address the visuals soon. Before we do that, let’s go over a couple of “advanced” Markdown elements, and how to get the most out of them. <blockquote><strong>Want to include your Bar Plots in your presentation? Follow these <a href="https://appsilon.com/data-visualization-best-practices-bar-plots/" target="_blank" rel="noopener noreferrer">Data Visualization Best Practices</a>.</strong></blockquote> <h2 id="advanced">Adding Images, Tables, and Custom Layouts to an R Markdown PowerPoint Presentation</h2> A presentation without images and tables is, well, boring. Also, most presentations make use of multiple layouts. For example, there are scenarios where a two-column layout is preferred. You’ll learn how to use it in this section. The code snippet below implements the following: <ul><li><strong>1st Slide</strong> - Loads a dog image from <a href="https://unsplash.com/photos/UinXDJCcqeY" target="_blank" rel="noopener noreferrer">Unsplash</a> and adds a caption to it.</li><li><strong>2nd Slide</strong> - Shows a table representing a subset from the <a href="https://gist.github.com/netj/8836201" target="_blank" rel="noopener noreferrer">Iris dataset</a>.</li><li><strong>3rd Slide</strong> - Implements a two-column layout.</li></ul> <script src="https://gist.github.com/darioappsilon/37a7b72b33753d95fa4553f0c968dd98.js"></script> This time, you won’t see any rendered output in the R Markdown file: <img class="size-full wp-image-12095" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eed00b05468d71b8f4e_Adding-images-tables-and-custom-layouts.webp" alt="Image 7 - Adding images, tables, and custom layouts" width="2564" height="1758" /> Image 7 - Adding images, tables, and custom layouts Here’s what the final PPTX looks like: <img class="size-full wp-image-12111" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01eefe6755ca41b304f53_Rendered-Powerpoint-presentation.gif" alt="Image 8 - Rendered Powerpoint presentation" width="1314" height="898" /> Image 8 - Rendered Powerpoint presentation You now know the basics of R Markdown - just enough to place any type of content into your R Markdown PowerPoint presentations. But how can you make the slideshow visually appealing? That’s what we’ll explore next. <h2 id="style">How to Style Your R Markdown PowerPoint Presentation</h2> The default PPTX layout is, well, default, and doesn’t look attractive at all. To change it, you’ll first have to create a blank PowerPoint presentation and open the Slide Master (<em>View - Slide Master</em>). Once inside, tweak it as you normally would when styling a PPTX file. <blockquote><strong>Excel is good, but not great. Check out our <a href="https://appsilon.com/excel-is-obsolete-here-are-the-top-2-alternatives-from-r-and-python/" target="_blank" rel="noopener noreferrer">top alternatives from R and Python</a>. </strong></blockquote> We’ll only change the theme, just to keep things simple: <img class="size-full wp-image-12101" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01ef20a2ba062e1ba27da_Editing-the-slide-master.webp" alt="Image 9 - Editing the slide master" width="3100" height="2024" /> Image 9 - Editing the slide master You’re free to take your time here and add custom graphics, fonts, and other visual elements. Once done, <strong>save the PPTX file right where your .Rmd file is</strong>: <img class="size-full wp-image-12115" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01ef40fc7bbb4c493e2d2_Saving-PowerPoint-template.webp" alt="Image 10 - Saving PowerPoint template" width="3424" height="2024" /> Image 10 - Saving PowerPoint template You can save it elsewhere, but it’s a good practice to keep the PowerPoint template and R Markdown file in the same directory. To use the template, you’ll only have to modify the header of the R Markdown file: <script src="https://gist.github.com/darioappsilon/f1b601dd3efaf3faa2e21ea06cf9c475.js"></script> That’s why we saved the PPTX template in the same directory. There’s no need to think about the path. Everything else in the Rmd file remains the same. Knit the PowerPoint presentation to verify the template was used: <img class="size-full wp-image-12113" src="https://webflow-prod-assets.s3.amazonaws.com/6525256482c9e9a06c7a9d3c%2F65b01ef4385c8d506b9c0ed3_Rendered-presentation-with-a-custom-template.gif" alt="Image 11 - Rendered presentation with a custom template" width="1314" height="898" /> Image 11 - Rendered presentation with a custom template And would you look at that - a custom PowerPoint template was successfully applied to our R Markdown PowerPoint presentation. We won’t dive into more advanced use cases today, as this alone is enough to cover what most programmers and tech users need. But if you'd like to learn about more advanced uses, let us know. <h2 id="conclusion">Conclusion</h2> PowerPoint isn’t for everyone, just like MS Word. If you know Markdown, you can write and edit text documents much faster than in a traditional word processor. What makes things even better is its shareability, as most online writing platforms understand Markdown. R Markdown is by no means a replacement for dedicated office suites, so keep that in mind. It might be a decent alternative if you need to automate slide production, simply don’t want to use PowerPoint, or if you don’t need all the functionalities it offers. To further drive the point home, we recommend the following homework tasks: <ul><li>Try to embed a YouTube video or a GIF. Is there any difference from regular images?</li><li>Add presenter notes to one or more slides.</li><li>Try to add animations between slides. Is it possible?</li></ul> Feel free to share results with us on Twitter – <a href="https://twitter.com/appsilon" target="_blank" rel="noopener noreferrer">@appsilon</a>. We’d love to see what you come up with. <blockquote><strong>R isn’t limited to Markdown only. <a href="https://appsilon.com/best-r-shiny-books-and-courses/" target="_blank" rel="noopener noreferrer">Here are the top free resources if you want to learn R Shiny</a>.</strong></blockquote>

Contact us!

Damian's Avatar

Read about simillar topics

JavaScript Tips for R/Shiny Developers

How to Develop Robust and Maintainable JavaScript Code Within a Shiny Application

presentation in r markdown

R Shiny and DuckDB: How to Speed Up Your Shiny Apps When Working With Large Datasets

presentation in r markdown

Shiny for Python Shinylive: How to Run Shiny for Python Apps Without a Python Server

Take your business further with custom data solutions.

Unlock the full potential of your enterprise with our data services, tailored to the unique needs of Fortune 500 companies. Elevate your strategy—connect with us today!

Presentations with Slidy

To create a Slidy presentation from R Markdown you specify the slidy_presentation output format in the front-matter of your document. You can create a slide show broken up into sections by using the ## heading tag (you can also create a new slide without a header using a horizontal rule ( ---- ). For example here’s a simple slide show:

Display Modes

The following single character keyboard shortcuts enable alternate display modes:

  • 'C' Show table of contents
  • 'F' Toggles the display of the footer
  • 'A' Toggles display of current vs all slides (useful for printing handouts)
  • 'S' Make fonts smaller
  • 'B' Make fonts larger

Incremental Bullets

You can render bullets incrementally by adding the incremental option:

If you want to render bullets incrementally for some slides but not others you can use this syntax:

Appearance and Style

There are several options that control the appearance of Slidy presentations:

highlight specifies the syntax highlighting style. Supported styles include “default”, “tango”, “pygments”, “kate”, “monochrome”, “espresso”, “zenburn”, and “haddock”. Pass null to prevent syntax highlighting.

smart indicates whether to produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses. Note that smart is enabled by default.

For example:

You can use the font_adjustment option to increase or decrease the default font size (e.g. -1 or +1) for the entire presentation. For example:

If you want to decrease the text size on an individual slide you can use the .smaller slide attribute. For example:

If you want to increase the text size on an indvidual slide you can use the .bigger slide attribute. For example:

You can also manually adjust the font size during the presentation using the ‘S’ (smaller) and ‘B’ (bigger) keys.

You can add your own CSS to a Slidy presentation using the css option:

You can also target specific slides or classes of slice with custom CSS by adding ids or classes to the slides headers within your document. For example the following slide header:

Would enable you to apply CSS to all of it’s content using either of the following CSS selectors:

Footer Elements

You can add a countdown timer to the footer of your slides using the duration option (duration is specified in minutes). For example:

You can also add custom footer text (e.g. organization name and/or copyright) using the footer option. For example:

Printing and PDF Output

You can print a Slidy presentation from within browsers that have good support for print CSS (i.e. as of this writing Google Chrome has the best support). Printing maintains most of the visual styles of the HTML version of the presentation.

To create a PDF version of a presentation you can use Print to PDF from Google Chrome.

Figure Options

There are a number of options that affect the output of figures within Slidy presentations:

fig_width and fig_height can be used to control the default figure width and height (7x5 is used by default)

fig_retina Specifies the scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Note that this only takes effect if you are using knitr >= 1.5.21. Set to null to prevent retina scaling.

fig_caption controls whether figures are rendered with captions

dev controls the graphics device used to render figures (defaults to png)

Data Frame Printing

You can enhance the default display of data frames via the df_print option. Valid values include:

MathJax Equations

By default MathJax scripts are included in Slidy presentations for rendering LaTeX and MathML equations. You can use the mathjax option to control how MathJax is included:

Specify “default” to use an https URL from the official MathJax CDN.

Specify “local” to use a local version of MathJax (which is copied into the output directory). Note that when using “local” you also need to set the self_contained option to false.

Specify an alternate URL to load MathJax from another location.

Specify null to exclude MathJax entirely.

For example, to use a local copy of MathJax:

To use a self-hosted copy of MathJax:

To exclude MathJax entirely:

Document Dependencies

By default R Markdown produces standalone HTML files with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. This means you can share or publish the file just like you share Office documents or PDFs. If you’d rather have keep depenencies in external files you can specify self_contained: false . For example:

Note that even for self contained documents MathJax is still loaded externally (this is necessary because of it’s size). If you want to serve MathJax locally then you should specify mathjax: local and self_contained: false .

One common reason keep dependencies external is for serving R Markdown documents from a website (external dependencies can be cached separately by browsers leading to faster page load times). In the case of serving multiple R Markdown documents you may also want to consolidate dependent library files (e.g. Bootstrap, MathJax, etc.) into a single directory shared by multiple documents. You can use the lib_dir option to do this, for example:

Advanced Customization

Keeping markdown.

When knitr processes an R Markdown input file it creates a markdown (md) file which is subsequently tranformed into HTML by pandoc. If you want to keep a copy of the markdown file after rendering you can do so using the keep_md option:

You can do more advanced customization of output by including additional HTML content or by replacing the core pandoc template entirely. To include content in the document header or before/after the document body you use the includes option as follows:

Custom Templates

You can also replace the underlying pandoc template using the template option:

Consult the documentation on pandoc templates for additional details on templates. You can also study the default HTML template as an example.

Markdown Extensions

By default R Markdown is defined as all pandoc markdown extensions with the following tweaks for backward compatibility with the markdown package:

You can enable or disable markdown extensions using the md_extensions option (you preface an option with - to disable and + to enable it). For example:

The above would disable the autolink_bare_uris extension and enable the hard_line_breaks extension.

For more on available markdown extensions see the pandoc markdown specification .

Pandoc Arguments

If there are pandoc features you want to use that lack equivilants in the YAML options described above you can still use them by passing custom pandoc_args . For example:

Documentation on all available pandoc arguments can be found in the pandoc user guide .

Shared Options

If you want to specify a set of default options to be shared by multiple documents within a directory you can include a file named _output.yaml within the directory. Note that no YAML delimeters or enclosing output object are used in this file. For example:

_output.yaml

All documents located in the same directory as _output.yaml will inherit it’s options. Options defined explicitly within documents will override those specified in the shared options file.

presentation in r markdown

Make PowerPoint Presentations with R Markdown

presentation in r markdown

November 30, 2018

About the speaker

Nathan stephens.

Nathan has a background in analytic solutions and consulting. He has experience building data science teams, architecting analytic infrastructure, and delivering innovative data products. He is a long time user of R.

  • More by Nathan Stephens

8   Slideshow Presentations

You are reading the free online version of this book. if you’d like to purchase a physical or electronic copy, you can buy it from no starch press , powell’s , barnes and noble or amazon ..

If you need to create a slideshow presentation, like one you might create in PowerPoint, R has you covered. In this chapter, you’ll learn how to produce presentations using xaringan . This package, which uses R Markdown, is the most widely used tool for creating slideshows in R.

You’ll use xaringan to turn the penguin report from Chapter 6 into a slideshow. You’ll learn how to create new slides, selectively reveal content, adjust text and image alignment, and style your presentation with CSS.

Why Use xaringan?

You might have noticed the Presentation option while creating a new R Markdown document in RStudio. This option offers several ways to make slides, such as knitting an R Markdown document to PowerPoint. However, using the xaringan package provides advantages over these options.

For example, because xaringan creates slides as HTML documents, you can post them online versus having to email them or print them out for viewers. You can send someone the presentation simply by sharing a link. Chapter 9 will discuss ways to publish your presentations online.

A second benefit of using xaringan is accessibility. HTML documents are easy to manipulate, giving viewers control over their appearance. For example, people with limited vision can access HTML documents in ways that allow them to view the content, such as by increasing the text size or using screen readers. Making presentations with xaringan lets more people engage with your slides.

How xaringan Works

To get started with xaringan , run install.packages("xaringan") in RStudio to install the package. Next, navigate to File > New File > R Markdown to create a new project. Choose the From Template tab and select the template called Ninja Presentation , then click OK .

You should get an R Markdown document containing some default content. Delete this and add the penguin R report you created in Chapter 6 . Then, change the output format in the YAML to xaringan::moon_reader like so:

The moon_reader output format takes R Markdown documents and knits them as slides. Try clicking Knit to see what this looks like. You should get an HTML file with the same name as the R Markdown document (such as xaringan-example.html ), as shown in Figure  8.1 .

presentation in r markdown

If you scroll to the next slide with the right arrow key, you should see familiar content. Figure  8.2 shows the second slide, which has the same text as the report from Chapter 6 and a cut-off version of its histogram.

presentation in r markdown

Although the syntax for making slides with xaringan is nearly identical to that used to make reports with R Markdown, you need to make a few tweaks so that the content can fit on the slides. When you’re working in a document that will be knitted to Word, its length doesn’t matter, because reports can have 1 page or 100 pages. Working with xaringan , however, requires you to consider how much content can fit on a single slide. The cut-off histogram demonstrates what happens if you don’t. You’ll fix it next.

Creating a New Slide

You’ll make this histogram fully visible by putting it in its own slide. To make a new slide, add three dashes ( --- ) where you’d like it to begin. I’ve added them before the histogram code:

When you knit the document again, what was one slide should now be broken into two: an Introduction slide and a Bill Length slide. However, if you look closely, you’ll notice that the bottom of the histogram is still slightly cut off. To correct this, you’ll change its size.

Adjusting the Size of Figures

Adjust the size of the histogram using the code chunk option fig.height :

Doing this fits the histogram fully on the slide and also reveals the text that was hidden below it. Keep in mind that fig.height adjusts only the figure’s output height; sometimes you may need to adjust the output width using fig.width in addition or instead.

Revealing Content Incrementally

When presenting a slideshow, you might want to show only a portion of the content on each slide at a time. Say, for example, that when you’re presenting the first slide, you want to talk a bit about each penguin species. Rather than show all three species when you open this slide, you might prefer to have the names come up one at a time.

You can do this using a feature xaringan calls incremental reveal . Place two dashes (–) between any content you want to display incrementally, like so:

This code lets you show Adelie onscreen first; then Adelie and Gentoo; and then Adelie, Gentoo, and Chinstrap. When presenting your slides, use the right arrow to incrementally reveal the species.

Aligning Content with Content Classes

You’ll also likely want to control how your content is aligned. To do so, you add the content classes .left[] , right[] , and center[] to specify the desired alignment for a piece of content. For example, to center-align the histogram, use .center[] as follows:

This code centers the chart on the slide.

Other built-in options can make two-column layouts. Adding .pull-left[] and .pull-right[] will make two equally spaced columns. Use the following code to display the histogram on the left side of the slide and the accompanying text on the right:

Figure  8.3 shows the result.

presentation in r markdown

To make a narrow left column and wide right column, use the content classes .left-column[] and .right-column[]. Figure  8.4 shows what the slide looks like with the text on the left and the histogram on the right.

presentation in r markdown

In addition to aligning particular pieces of content on slides, you can also horizontally align the entire content using the left , right , and center classes. To do so, specify the class right after the three dashes that indicate a new slide, but before any content:

This code produces a horizontally centered slide. To adjust the vertical position, you can use the classes top , middle , and bottom .

Adding Background Images to Slides

Using the same syntax you just used to center the entire slide, you can also add a background image. Create a new slide, use the classes center and middle to horizontally and vertically align the content, and add a background image by specifying the path to the image within the parentheses of url() :

To run this code, you’ll need a file called penguins.jpg in your project (you can download it at https://data.rfortherestofus.com/penguins.jpg ). Knitting the document should produce a slide that uses this image as a background with the text Penguins in front of it, as shown in Figure  8.5 .

presentation in r markdown

Now you’ll add custom CSS to further improve this slide.

Applying CSS to Slides

One issue with the slide you just made is that the word Penguins is hard to read. It would be better if you could make the text bigger and a different color. To do this, you’ll need to use Cascading Style Sheets (CSS) , the language used to style HTML documents. If you’re thinking, I’m reading this book to learn R, not CSS , don’t worry: you’ll need only a bit of CSS to make tweaks to your slides. To apply them, you can write your own custom code, use a CSS theme, or combine the two approaches using the xaringanthemer package.

To add custom CSS, create a new code chunk and place css between the curly brackets:

This code chunk tells R Markdown to make the second-level header ( h2 ) 150 pixels large and white. Adding .remark-slide-content before the header targets specific elements in the presentation. The term remark comes from remark.js , a JavaScript library for making presentations that xaringan uses under the hood.

To change the font in addition to the text’s size and color, add this CSS:

The first new line makes a font called Inter available to the slides, because some people might not have the font installed on their computers. Next, this code applies Inter to the header and makes it bold. You can see the slide with bold Inter font in Figure  8.6 .

presentation in r markdown

Because xaringan slides are built as HTML documents, you can customize them with CSS however you’d like. The sky’s the limit!

You may not care to know the ins and outs of CSS. Fortunately, you can customize your slides in two ways without writing any CSS yourself. The first way is to apply xaringan themes created by other R users. Run this code to get a list of all available themes:

The output should look something like this:

Some CSS files change fonts only, while others change general elements, such as text size, colors, and whether slide numbers are displayed. Using prebuilt themes usually requires you to use both a general theme and a fonts theme, as follows:

This code tells xaringan to use the default CSS, as well as customizations made in the metropolis and metropolis-fonts CSS themes. These come bundled with xaringan , so you don’t need to install any additional packages to access them. Figure  8.7 shows how the theme changes the look and feel of the slides.

presentation in r markdown

If writing custom CSS is the totally flexible but more challenging option for tweaking your xaringan slides, then using a custom theme is simpler but a lot less flexible. Custom themes allow you to easily use others’ prebuilt CSS but not to tweak it further.

The xaringanthemer Package

A nice middle ground between writing custom CSS and applying someone else’s theme is to use the xaringanthemer package by Garrick Aden-Buie. This package includes several built-in themes but also allows you to easily create your own custom theme. After installing the package, adjust the css line in your YAML to use the xaringan-themer.css file like so:

Now you can customize your slides by using the style_xaringan() function. This function has over 60 arguments, enabling you to tweak nearly any part of your xaringan slides. To replicate the custom CSS you wrote earlier in this chapter using xaringanthemer , you’ll use just a few of the arguments:

This code sets the header size to 150 pixels and makes all the headers use the bold, white Inter font.

One particularly nice thing about the xaringanthemer package is that you can use any font available on Google Fonts by simply adding its name to header_font_family or another argument that sets font families ( text_font_family and code_font_family are the other two, for styling body text and code, respectively). This means you won’t have to include the line that makes the Inter font available.

In this chapter, you learned how to create presentations using the xaringan package. You saw how to incrementally reveal content on slides, create multi-column layouts, and add background images to slides. You also changed your slides’ appearance by applying custom themes, writing your own CSS, and using the xaringanthemer package.

With xaringan , you can create any type of presentation you want and then customize it to match your desired look and feel. Creating presentations with xaringan also allows you to share your HTML slides easily and enables greater accessibility.

Additional Resources

Garrick Aden-Buie, Silvia Canelón, and Shannon Pileggi, “Professional, Polished, Presentable: Making Great Slides with xaringan,” workshop materials, n.d., https://presentable-user2021.netlify.app .

Silvia Canelón, “Sharing Your Work with xaringan: An Introduction to xaringan for Presentations: The Basics and Beyond,” workshop for the NHS-R Community 2020 Virtual Conference, November 2, 2020, https://spcanelon.github.io/xaringan-basics-and-beyond/index.html .

Alison Hill, “Meet xaringan: Making Slides in R Markdown,” slideshow presentation, January 16, 2019, https://arm.rbind.io/slides/xaringan.html .

Yihui Xie, J. J. Allaire, and Garrett Grolemund, “xaringan Presentations,” in R Markdown: The Definitive Guide (Boca Raton, FL: CRC Press, 2019), https://bookdown.org/yihui/rmarkdown/ .

  • United States
  • United Kingdom

How to create PowerPoint slides from R

Learn how to generate powerpoint slides straight from an r markdown document. plus, create interactive html slides in r with the xaringan package..

Executive Editor, Data & Analytics, InfoWorld |

How to create PowerPoint slides from R

There are lots of ways to share results of your R analysis: Word documents , interactive apps , even in the body of an email .

But sometimes, you want a slide presentation. It’s easy to generate a PowerPoint file from your R code – complete with charts and graphs – directly from an R Markdown document.

Create a PowerPoint from R Markdown

To create a PowerPoint from R, you need three things on your system:

  • PowerPoint or OpenOffice,
  • The rmarkdown package, version 1.9 or later, and
  • Pandoc version 2.0.5 or newer.

Pandoc isn’t an R package. It’s not R at all; it’s a separate piece of open source software designed for file format conversions.

RStudio ships with Pandoc, so you probably have a version of it installed if you use RStudio. You can run the rmarkdown package’s pandoc_version() function to see if you’ve got it installed and, if so, what version. If your pandoc is too old, try updating RStudio (or install pandoc directly from pandoc.org ).

There is an option to create a PowerPoint file from R Markdown when you create a new markdown file in RStudio.

Next, create an R Markdown document. If you do that from RStudio’s menu with File > New File > R Markdown, you’ll have a few choices . If you click on the second choice, Presentation, you should see an option for PowerPoint under Default Output Format.

The resulting R Markdown file created by RStudio includes examples for mixing text and R code results. If you save that file and then “knit” it by clicking the knit button in RStudio, you'll get a PowerPoint presentation with the same information.

How did R know where to break the content into new slides? The default is “the highest level of headline that’s not followed immediately by another headline.” In this case that’s headline level two, or all titles starting with ## .

You don’t need to use that default rule, though. You can specify another headline level to auto-divide your document into new slides. That’s done in the doc’s YAML header  with the slide_level option, such as

But if you don’t want to fiddle with all that, you can divide content into new slides manually with three dashes. Make sure the three dashes are on a completely new line.

Presenting the weather

Here is an R Markdown file that’s a bit more interesting than the default doc, at least for me: One with weather data.

Notice the R chunk options I’ve set.  echo = FALSE  means my R code won’t show up in my slides. warning and message set to FALSE makes sure any warnings or messages from my code don’t appear in the slides either. I’ve also set a default figure width and cache = TRUE  . (I don’t usually cache results for a file I want to update regularly, but I did so to save time on the accompanying video.)

Get National Weather Service forecast data via R

My R Markdown setup code chunk also sources a separate file on GitHub that includes two functions for fetching weather data. Here is that code, if of interest:

The first function pulls a forecast data frame from the National Weather Service API using the city name and the city’s forecast URL as function arguments. 

You need to know the API’s forecast URL for a location in order to get its forecast data. If you don’t know that URL, you can get it from another National Weather Service API using the format 

The initial API result from the httr GET request is a list. The function adds code that returns only the portion of the list with the data I want, formatted as a data frame.

The second function takes that forecast data frame and generates a ggplot line graph for high and low temperatures.

Change the PowerPoint default font

If you want a different default font or font size for your R-generated slides, you can set those with a reference PowerPoint document and add info about that document in the R Markdown YAML header. I did that for these slides, as you can see in this portion of the YAML document header:

My reference file, CorporateStyle.pptx ,  is a regular PowerPoint file and not a PowerPoint template. To turn it into a reference file, I went into the file’s Master Slide view and set some styles. You can edit any PowerPoint file’s Master Slide view in the PowerPoint menu with View > Slide Master.

Whenever I want an updated version of that forecast PowerPoint, I just need to re-knit the document. I could even set this up to run automatically using Windows scheduler or launchd on a Mac.

Create HTML slides from R

There might be many times when you specifically need or want a PowerPoint file. One thing PowerPoint slides lack, though, is interactivity. For example, you can’t roll over a graph and see underlying data.

You could if these were HTML slides, though.

There are a few ways to generate HTML slides from R. One of the most popular is with the xaringan R package . xaringan is built on top of the remark.js JavaScript library. There is a bit of a learning curve to do more than the basics, but the look and feel are extremely customizable.

xaringan would need its own series to cover all you can do with it. But even basics can work for a lot of use cases. Below is an example of an R Markdown document with just a bit of customization.

Three dashes create a new slide. That first slide after the title slide won’t display; it’s setting defaults for the other slides. layout: true means “this is a slide setting up layout defaults.” class: center centers everything – header text, graphics – unless I specifically code it otherwise. 

The xaringan::moonreader output option regenerates the slides each time you save the file so you don’t need to click the knit button. 

The body of the file includes a graphing function I wrote using one of my favorite dataviz packages, echarts4r , to visualize my weather data. You can hover over lines on the graphs in these slides to see underlying data, as well as click legend items to turn lines off and on.

An HTML slide presentation lets you interact with visualizations, such as hovering over a graph to see underlying data.

There is a ton more you can do with xaringan, from adding your own CSS file to creating your own theme to animating slides. Here are some resources to learn more:

  • xaringan slide presentation about xaringan by creator Yihui Xie
  • Incremental slides with xaringan by creator Yihui Xie
  • xaringan presentations from R Markdown: the Definitive Guide by Yihui Xie, J. J. Allaire, and Garrett Grolemund
  • xaringan gallery of examples and themes by Emil Hvitfeldt
  • Meet xaringan: Making slides in R Markdown by Alison Hill (RStudio Conference 2019 workshop slides)
  • xaringanExtra package (enhancements and extensions to the xaringan package) by Garrick Aden-Buie
  • xaringanthemer package (lots of xaringan styling options)  by Garrick Aden-Buie

And for more R tips, head to the Do More With R page .

Next read this:

  • Why companies are leaving the cloud
  • 5 easy ways to run an LLM locally
  • Coding with AI: Tips and best practices from developers
  • Meet Zig: The modern alternative to C
  • What is generative AI? Artificial intelligence that creates
  • The best open source software of 2023
  • Business Intelligence
  • Data Visualization

Sharon Machlis is Director of Editorial Data & Analytics at Foundry, where she works on data analysis and in-house editor tools in addition to writing. Her book Practical R for Mass Communication and Journalism was published by CRC Press. She was named Digital Analytics Association's 2021 Top (Data) Practitioner, winner of the 2023 Jesse H. Neal journalism award for best instructional content, 2014 Azbee national gold award for investigative reporting, and 2017 Azbee gold for how-to article, among other awards. You can find her on Mastodon at masto.machlis.com/@smach .

Copyright © 2022 IDG Communications, Inc.

presentation in r markdown

R-bloggers

R news and tutorials contributed by hundreds of R bloggers

Mastering r presentations.

Posted on September 23, 2019 by R on Coding Club UC3M in R bloggers | 0 Comments

[social4i size="small" align="align-left"] --> [This article was first published on R on Coding Club UC3M , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here ) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

by Paula LC

Do you want to know how to make elegant and simple reproducible presentations? In this talk, we are going to explain how to do presentations in different output formats using one of the easiest and most exhaustive statistical software, R. Now, it is possible create Beamer, PowerPoint, or HTML presentations, including R code, \(\LaTeX\) equations, graphics, or interactive content.

After the tutorial, you will be able to create R presentations on your own with R Markdown in RStudio. But don’t worry if you don’t know a lot of R Markdown, because it’s really simple to use it with RStudio and you will discover the keys to master the language.

We have several options to create amazing technical presentations in pdf format with tools like PowerPoint or \(\LaTeX\) . But the truth is that when we want to generate a full and complete document with graphs, code, and text, then we invest more time in the appearance than in the content itself, or learning how to add content easily. So here I want to show you a good alternative using R. The best feature R has is the flexibility and simplicity of the code to reproduce amazing presentations with little work. To achieve it, R uses Markdown. But, what is exactly Markdown?

What is Markdown?

Markdown is a simple language to write web-based content easy both for writing and reading. The key is that it can be converted to many output formats with a simplified syntax.

Basics of Markdown

Here you have a summary guide of the main style syntax.

Code and syntax highlighting

Blockquotes, tex formula.

Besides these basics, you can to add tables, rulers, links to videos, HTML code, etc. To know more visit the creator’s web site: https://daringfireball.net/projects/markdown/ or this cheatsheet https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet .

R has a specific file format for this type of documents .Rmd . R Markdown has an online book really useful and detailed here https://bookdown.org/yihui/rmarkdown/ . This tool let you build different type of documents like the next ones:

  • Documents : HTML, \(\LaTeX\) /PDF, Microsoft Word, Tufte-style handouts
  • Interactive documents : HTML Widgets, Shiny
  • Dashboards : Gauges, values boxes, HTML Widgets, Shiny, Storyboard
  • Books : HTML, PDF, EPUB
  • JSS templates, R Journal, Skeleton, CV
  • Package Vignettes
  • Presentations : Beamer, Slidy, ioslides, reveal.js, xaringan

In the next link, you will find some examples of each one https://rmarkdown.rstudio.com/gallery.HTML . And in this cheatsheet, a good summary of R Markdown is presented https://rmarkdown.rstudio.com/lesson-15.HTML .

How to start

The first step is to get R and RStudio, and install the package rmarkdown with the code

In the last versions you can directly create presentations going to File -> New File -> R Presentation . Then, a .RPres document is going to be created. This is the simplest, really simplest, way to start but my advice is to go quickly to the next step if you want more flexibility in the slides and final appearance.

So going to File -> New File -> R Markdown and selecting the option Presentation , you are going to have different options to create your slides. Selecting any of them, a file like this is automatically generated:

presentation in r markdown

Depending on the final style of the output there are different output options. In the next points, we are going to explain in detail the main features of all them.

  • ioslides : the option output: ioslides_presentation
  • slidy : the option output: slidy_presentation
  • beamer : the option output: beamer_presentation

The R Markdown file

The header is the R Markdown document part where you can set the title, the author, the date, and the output as the image shows:

But at the same time, other options can be determined as follows:

Once the header is completed, you can add any kind of content that you can practically imagine: R code, equations, charts, images, videos etc. In the next points we are going to see how to add each type of content.

In addition to plain text, headers and other Markdown elements, you have the option of inserting R code which will be executed every time you run the file. These parts of the document are called R chunks . To insert an R Chunk you can use RStudio toolbar Insert button or the keyboard shortcut Ctrl + Alt + I on Windows and Cmd + Option + I on macOS.

There are a lot of options referring to how to include tables, text output, figures, etc. For example, to add the option to show in the output the R code before the results you have to add between the brackets {r } the option echo as follows {r echo=TRUE} . By default, the code is not shown.

More options:

  • cache : cache results for future knits (default = FALSE)
  • cache.path : directory to save cached results in (default = “cache/”)
  • child : file(s) to knit and then include (default = NULL)
  • collapse : collapse all output into single block (default = FALSE)
  • comment : prefix for each line of results (default = ‘##’)
  • dependson : chunk dependencies for caching (default = NULL)
  • echo : Display code in output document (default = TRUE)
  • engine : code language used in chunk (default = ‘R’)
  • error : Display error messages in doc (TRUE) or stop render when errors occur (FALSE) (default = FALSE)
  • eval : Run code in chunk (default = TRUE)
  • message : display code messages in document (default = TRUE)
  • results=asis : passthrough results
  • results=hide : do not display results
  • results=hold : put all results below all code
  • tidy : tidy code for display (default = FALSE)
  • warning : display code warnings in document (default = TRUE)
  • fig.align : ‘lef’, ‘right’, or ‘center’ (default = ‘default’)
  • fig.cap : figure caption as character string (default = NULL)
  • fig.height, fig.width : Dimensions of plots in inches
  • highlight : highlight source code (default = TRUE)
  • include : Include chunk in doc after running (default = TRUE)

In the next link you can find more details about R chunks: https://bookdown.org/yihui/rmarkdown/r-code.HTML

There is the chance to add equations to your presentations with MathJax scripts. These are included in HTML documents for rendering \(\LaTeX\) and MathML equations. To control how MathJax is included you have the next options:

  • default to use an HTTPS URL from a CDN host (currently provided by RStudio)
  • local : to use a local version of MathJax (which is copied into the output directory). Note that when using “local” you also need to set the self_contained option to false.
  • URL indicating the location to load MathJax
  • null to exclude MathJax entirely.

For example, to use a local copy of MathJax:

To use a self-hosted copy of MathJax:

You have four options to add tables. First one, directly from R Markdown

or the next ones, from R code with the libraries knitr , xtable , or stargazer .

Interactive graphs

In R there are a lot of packages to create interactive graphs. Highcharter is one of them, as well as the well-known HTMLwidgets . Here we have an example of a highcharter graph.

Presentation formats

We just explored the different contents and parts of our R Markdown document. Let’s see what type of output format we can obtain.

Ioslides is a nice R presentation format characterized by the simplicity of the result. There are some features specific from ioslides, such as the display mode

  • f : enable fullscreen mode
  • w : toggle widescreen mode
  • o : enable overview mode
  • h : enable code highlight mode
  • p : show presenter notes

or the incremental bullets:

Moreover, you can change the presentation size, the text size, or even the transition speed in the header of the document. Specifically, for the transition speed you can set the number of seconds for each slide or use the standard options: default , slower , faster .

For another hand, there is a quick way to add a background image without editing the CSS file,

But if you want to add specific style changes to your presentation, I recommend you to edit the CSS file and add it to the header of the RMarkdown document:

One of the disadvantages of ioslides is that customization is limited compared with other output formats. At the end of this tutorial we explain how to modify by your own a CSS file.

Slidy has more flexibility than ioslides as to appearance and style. Now we are going to see some of the main special features that slidy has.

There is the chance to change the display mode with the next shortcuts;

  • c : Show table of contents
  • c : Toggles the display of the footer
  • a : Toggles display of current vs all slides (useful for printing handouts)
  • s : Make fonts smaller
  • b : Make fonts larger

And we can adjust the font directly in the header of the document without editing the CSS file:

You will find other interesting features of slidy such as the countdown timer in the footer or the customized footer text that can be easily added with the options duration and footer .

Slidy themes

In slidy, there are different Boostrap themes to use drawn from the Bootswatch theme library. The themes are default , cerulean , journal , flatly , darkly , readable , spacelab , united , cosmo , lumen , paper , sandstone , simplex , and yeti . To add your own style with a CSS file, pass null in the theme parameter.

Moreover, the syntax highlighting style can be specified with the option highlight . Supported styles are default , tango , pygments , kate , monochrome , espresso , zenburn , haddock , and textmate . And you have the option of preventing syntax highlighting passing null to the parameter.

Beamer is a \(\LaTeX\) class to produce presentations and slides. It is so common in academia and so useful to add mathematical formulas and expressions. You can create your own Beamer presentations from R without a deep knowledge of \(\LaTeX\) (only Markdown).

So the first step is to install tex. Tex is a typesetting for complex mathematical formulae used in \(\LaTeX\) . To install it, download tone of the next programs, depending on your OS system: - MikTeX on Windows - MacTeX 2013+ on OS X - TeX Live 2013+ on Linux

Beamer themes are the same that you can find in \(\LaTeX\) . In the next link https://hartwork.org/beamer-theme-matrix/ you have the list of the different available header options related to the appearance and style:

There are other interesting options to create presentations in R such as reveal.js and xaringan. Reveal is very well-known because of the flexibility in the themes and transitions by default, the vertical slides or the possibility to include a web site inside a slide. In this part, we are going to explain how to generate a revealjs file and the main features of this awesome library.

First of all, it is required to install revealjs package

Then, you can directly change in the R Markdown document header the output argument to revealjs_presentation or go to menu File -> New File -> R Markdown -> From template and select reveal.js presentation.

presentation in r markdown

There are some amazing keyboard shortcuts:

- f for fullscreen - o or ESC for overview mode - alt or ( ctrl in Linux) and click an element, to zoom this element - s for speaker view (so pretty!) - B or . to pause the presentation

And there is a lot of variety about appearance and styles. If you want to change how the presentation looks like, you can choose any of the next theme options: default , simple , sky , beige , serif , solarized , blood , moon , night , black , league , and white . And for the syntax highlighting style: default , tango , pygments , kate , monochrome , espresso , zenburn , and haddock . Pass null to prevent syntax highlighting. The way to specify it is the same than the previous presentation types.

In revealjs you can center the text of the slides changing the center option to true, which by default is false, as well as the possibility of modifying the transitions and backgrounds, i.e. how the slide is going to move to the next one. Available transitions and background_transitions are default , fade , slide , convex , concave , zoom or none . Any of these global options can be overriden specifying the data-transition attribute in the header of the slide:

Moreover, Revealjs lets add different backgrounds like color, image, video, and iframe:

Finally, you can specify the level of heading will be used with the slide_level option. For example, if the slide_level is 2, the level-1 headers will be built horizontally and level-2 headers, vertically.

Other interesting features are the great look on touch devices, the fragmented slides, easy to export to pdf, keyboard bindings, or the parallax scrolling background.

References https://CRAN.R-project.org/package=revealjs .

Ninja presentation

The last type of presentations that we are going to see is the xaringan library. It is an R Markdown extension based on the JavaScript library remark.js ( https://remarkjs.com ). This package was originally designed for “ninja”, so it is recommended to people that have a well-known of CSS. For another hand, if you need slides to be self-contained, then xaringan it is not a good option because needs a webserver to run. Another bad news is that xaringan doesn’t work well with HTML widgets.

To install the library type

or install it directly from GitHub to ensure that you are downloading the last version

Once you get installed, go to the menu File -> New File -> R Markdown -> From template and click on ninja presentation.

presentation in r markdown

Note: If you understand chinese you can select the last option ;).

The header is going to look like this

A lit bit more complicated than others and as you will see, there are some funny arguments that make this library really different.

  • css : to add your own CSS file,
  • self_contained : to produce a self-contained HTML file
  • seal : to generate a title slide automatically using the YAML metadata of the R Markdown document (if FALSE, you should write the title slide by yourself)
  • yolo : to insert the Mustache Karl (TM) randomly in the slides. Using TRUE, a number between 0-1 to insert the Mustache Karl in a percentage of the slides, or even a list(times = n, img = path)
  • chakra : path to the remark.js library (can be either local or remote).
  • nature : (Nature transformation) A list of configurations to be passed to remark.create(), e.g. list(ratio = ‘16:9’, navigation = list(click = TRUE)); see https://github.com/gnab/remark/wiki/Configuration

Besides the options provided by remark.js, there are others such interesting like autoplay the slides or the countdown timer. Slides can be automatically played setting the autoplay option under nature (in milliseconds). For example, to display slides every 30 seconds and see the countdown timer:

It is possible to highlight code lines turning the option highlightLines to true or to extend the markdown syntax defining custom macros with the beforeInit option under the option nature.

Adding your CSS file

Some of the previous presentation formats give us the chance to add a customized CSS file. To know how to change a specific element you can inspect it with any web browser and focus exactly on what you want to modify by yourself. An example of a basic modification in a CSS file is the next one. Here we are selecting the background color of the body, the color of the headers and the full text for the reveal presentation, and the size of the h1 header:

Then you have to save the CSS file in the same path that your R presentation document.

How to export the presentation

With all the HTML output it is possible to export the presentation to pdf with any web browser using the menu Print to PDF from Google Chrome, for example. But there is another alternative like publishing the presentation online in RPubs or GitHub. You must be registered in any of the two platforms to be able to add your work. For RPubs, you have to invoke the More -> Publish to RPubs command from the presentation toolbar, and in GitHub, you have to create a new repository with the HTML document and all the style files associated, and enable to GitHub pages to this repository. Here you have the steps to do it: https://pages.github.com/ .

Basic example

Finally, let’s show you a simple reveal.js example to get you started.

After knitting this, here is the result:

Conclusions

RStudio is an awesome framework that provides you the chance to create nice presentations with a simple syntax, adding interactive content, and with a professional and modern style. Moreover, your presentation will be reproducible if you want to make any change, as well as you can save your templates to use them in the future. In my opinion, it is a really good alternative to other traditional software to create presentations and so easy to work with it. I hope it is so useful for you too 🙂

To leave a comment for the author, please follow the link and comment on their blog: R on Coding Club UC3M . R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job . Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Copyright © 2022 | MH Corporate basic by MH Themes

Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts. (You will not see this message again.)

9 Presentations in R markdown

There are several schemes for making presentations with R markdown. I like to use the xaringan package (others include ioslides and beamer). To make an xaringan presentation, install the package then (after restarting RStudio) go to File > New File > R Markdown > From Template > Ninja Presentation. This will open a draft document showing some of the features you can use. Knit it, then start to edit it. Everything you have learnt above about formatting R markdown documents, code chunks, figures and tables for documents applies to presentations.

New slides in xaringan are made with three minus signs. There must not be anything else on that line (not even a space) or it will draw a horizontal line instead.

BioST@TS homepage

presentations

presentation in r markdown

SEEC

  • News Archive
  • Affiliates and Collaborators
  • SEEC Research
  • STA2007/STA5014
  • Experimental and survey design
  • Ecological forecasting and GIS in R
  • Data exploration
  • Hidden Markov Models for time series
  • Bayesian analysis
  • Time series analysis
  • Meta-analysis
  • Generalised additive models (GAMs)
  • Generalised Linear Mixed Models
  • Multimodel inference (model selection and model averaging)
  • Classification and regression trees
  • Constrained ordination
  • Introduction to multivariate analyses
  • Model-based Multivariate Analyses
  • Population-related Toolboxes
  • R Tidyverse
  • ggplot2 - the grammar of graphics
  • Cloud computing with R
  • Reproducible R
  • Species Distribution Modelling
  • SDMs - using spatial information to supplement biased occurrence data
  • Building and using SDM ensembles
  • Occupancy models
  • Distance sampling
  • Handling Spatial Data
  • Spatial capture-recapture (SCR) modelling
  • Animal movement modelling with moveHMM
  • Time-to-detection occupancy models
  • Spatial occupancy models
  • Single-season occupancy models using a Bayesian approach
  • Spatial Interpolation
  • Dynamic occupancy models
  • Basics of point pattern analysis
  • Estimating survival from CMR data
  • Publications

Joshua Weeber Wins Best Presentation at 2023 SEEC Student Symposium

joshua and frog

Each year, SEEC provides a platform for students to present their cutting-edge research at the SEEC Student Symposium, fostering a collaborative environment for emerging scientists to share their work and contribute to crucial environmental discussions.

The 2023 SEEC Student Symposium saw remarkable presentations from emerging researchers, with the award for best presentation going to Joshua Weeber, a PhD candidate from the University of Cape Town and the South African National Biodiversity Institute. A conservation herpetologist at the Endangered Wildlife Trust, Weeber captivated the audience with his in-depth study on the occupancy dynamics of the Table Mountain Ghost Frog tadpoles.

The award-winning presentation highlighted Weeber’s work in assessing the extinction risk of South Africa's reptiles and amphibians, identifying conservation strategies and research priorities for these groups. His PhD research focuses on understanding the ecology and associated threats to the Table Mountain Ghost Frog, a species integral to South Africa's biodiversity. By investigating the occupancy dynamics of these elusive tadpoles, he aims to inform and enhance conservation actions.

Reflecting on his experience at the symposium, Weeber emphasized the potential for conservationists to significantly improve their impact by adopting more complex and structured statistical approaches. He attributed his win to the compelling visuals of beautiful frogs included in his presentation, which undoubtedly captivated the audience. "It was amazing and humbling to see all of the incredible work happening at SEEC," he remarked.

Ghost Frog

The success of his presentation was also a testament to the support and guidance from his supervisors, Res Altwegg, Krystal Tolley, and Jeanne Tarrant, whose expertise and mentorship have been invaluable throughout his research journey.

A short film about the broader project was shared, providing a deeper insight into the significance of Weeber’s research and the conservation efforts surrounding South Africa's unique amphibian species.

The SEEC Student Symposium continues to be a platform for fostering innovation and excellence in environmental science, and this year's event was no exception, showcasing groundbreaking research that promises to drive impactful conservation strategies.

R Markdown: The Definitive Guide

Chapter 8 reveal.js presentations.

The revealjs package ( El Hattab and Allaire 2017 ) provides an output format revealjs::revealjs_presentation that can be used to create yet another style of HTML5 slides based on the JavaScript library reveal.js . You may install the R package from CRAN:

To create a reveal.js presentation from R Markdown, you specify the revealjs_presentation output format in the YAML metadata of your document. You can create a slide show broken up into sections by using the # and ## heading tags; you can also create a new slide without a header using a horizontal rule ( --- ). For example, here is a simple slide show:

See Figure 8.1 for two sample slides.

Two sample slides created from the revealjs package.

FIGURE 8.1: Two sample slides created from the revealjs package.

IMAGES

  1. Work with R Markdown

    presentation in r markdown

  2. presentation in r markdown

    presentation in r markdown

  3. R Markdown slides part 2 of 6

    presentation in r markdown

  4. 29 R Markdown formats

    presentation in r markdown

  5. The Basics of R Markdown to Presentation Output « A Journey into Data

    presentation in r markdown

  6. Work with R Markdown

    presentation in r markdown

VIDEO

  1. R markdown tutorial

  2. How to create html presentations with markdown files

  3. Using "rmarkdown' package to create dynamic report in R

  4. How to Create PowerPoint Presentations using RMarkdown and officer package in R

  5. Introduction to R Markdown

  6. Introduction to R Markdown

COMMENTS

  1. Chapter 4 Presentations

    The first official book authored by the core R Markdown developers that provides a comprehensive and accurate reference to the R Markdown ecosystem. With R Markdown, you can easily create reproducible data analysis reports, presentations, dashboards, interactive applications, books, dissertations, websites, and journal articles, while enjoying the simplicity of Markdown and the great power of ...

  2. Slide Presentations

    R Markdown renders to four presentation formats: Each format will intuitively divide your content into slides, with a new slide beginning at each first or second level header. Insert a horizontal rule ( ***) into your document to create a manual slide break. Create incremental bullets with >-, as in the .Rmd file below, which is available here ...

  3. How To Make A PowerPoint Presentation Using R Markdown

    Image 1 - Creating a new R Markdown PowerPoint Presentation. Give your presentation a title and optionally specify the author. Also, make sure to select PowerPoint as the default output format. R will ask you to install a couple of dependencies if this is your first time working with R Markdown.

  4. 7.3 Slide formatting

    The first official book authored by the core R Markdown developers that provides a comprehensive and accurate reference to the R Markdown ecosystem. With R Markdown, you can easily create reproducible data analysis reports, presentations, dashboards, interactive applications, books, dissertations, websites, and journal articles, while enjoying the simplicity of Markdown and the great power of ...

  5. How To Make A PowerPoint Presentation Using R Markdown

    We assume you have R and RStudio installed. Once in RStudio, go to File - New File - R Markdown. A window like the one below should appear: Image 1 - Creating a new R Markdown PowerPoint Presentation Give your presentation a title and optionally specify the author. Also, make sure to select PowerPoint as the default output format.

  6. Presentations with Slidy

    To create a Slidy ⧉ presentation from R Markdown you specify the slidy_presentation output format in the front-matter of your document. You can create a slide show broken up into sections by using the ## heading tag (you can also create a new slide without a header using a horizontal rule ( ---- ). For example here's a simple slide show: ---.

  7. R Markdown Presentation with Interactive Plot using Plotly

    Learn how to create a stunning presentation with R Markdown and Plotly, a powerful tool for interactive data visualization. This tutorial will show you how to use Plotly's features to create dynamic plots that can be customized and shared. Whether you are a student, a teacher, or a researcher, you will find this guide useful and inspiring.

  8. Make PowerPoint Presentations with R Markdown · RStudio

    This webinar demonstrates how to create feature rich PowerPoint presentations from R Markdown and how to use these presentations to share insights, visualizations, Shiny apps, and more.

  9. R for the Rest of Us: A Statistics-Free Introduction

    If you need to create a slideshow presentation, like one you might create in PowerPoint, R has you covered. In this chapter, you'll learn how to produce presentations using xaringan. This package, which uses R Markdown, is the most widely used tool for creating slideshows in R.

  10. How to create PowerPoint slides from R

    Learn how to generate PowerPoint slides straight from an R Markdown document. Plus, create interactive HTML slides in R with the xaringan package.

  11. Introduction to R Markdown

    R Markdown is a file format for making dynamic documents with R. An R Markdown document is written in markdown (an easy-to-write plain text format) and contains chunks of embedded R code, like the document below. This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents.

  12. Getting Started with R Markdown

    Learn the fundamentals of R markdown in this in-depth tutorial, or simply use it as a quick reference guide and cheatsheet for R markdown formatting.

  13. rmarkdown: Make interactive PowerPoint slide presentations in R

    Slide Decks are so important for #storytelling in business. We can use #Rmarkdown to tell our story with engaging interactivity. Here's how to make Interactive #PowerPoint -style Slide # ...

  14. R Markdown

    R Markdown is a powerful tool for creating documents, reports, presentations and dashboards with R and other languages. Learn how to use R Markdown notebooks, a convenient way to write and execute code, and integrate them with version control systems.

  15. Mastering R presentations

    by Paula LC Do you want to know how to make elegant and simple reproducible presentations? In this talk, we are going to explain how to do presentations in different output formats using one of the easiest and most exhaustive statistical software, R. Now, it is possible create Beamer, PowerPoint, or HTML presentations, including R code, \\(\\LaTeX\\) equations, graphics, or interactive content ...

  16. 9 Presentations in R markdown

    9. Presentations in R markdown. There are several schemes for making presentations with R markdown. I like to use the xaringan package (others include ioslides and beamer). To make an xaringan presentation, install the package then (after restarting RStudio) go to File > New File > R Markdown > From Template > Ninja Presentation.

  17. R Markdown: The Definitive Guide

    The first official book authored by the core R Markdown developers that provides a comprehensive and accurate reference to the R Markdown ecosystem. With R Markdown, you can easily create reproducible data analysis reports, presentations, dashboards, interactive applications, books, dissertations, websites, and journal articles, while enjoying the simplicity of Markdown and the great power of ...

  18. Creating presentations with R Markdown

    Creating presentations with R Markdown

  19. presentations

    Edit this page Previous

  20. Gallery

    Turn your analyses into high quality documents, reports, presentations and dashboards with R Markdown. Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output. Use multiple languages including R, Python, and SQL. R Markdown supports a reproducible workflow for dozens of static and ...

  21. Joshua Weeber Wins Best Presentation at 2023 SEEC Student Symposium

    The 2023 SEEC Student Symposium saw remarkable presentations from emerging researchers, with the award for best presentation going to Joshua Weeber, a PhD candidate from the University of Cape Town and the South African National Biodiversity Institute. A conservation herpetologist at the Endangered Wildlife Trust, Weeber captivated the audience with his in-depth study on the occupancy dynamics ...

  22. Chapter 8 reveal.js Presentations

    The first official book authored by the core R Markdown developers that provides a comprehensive and accurate reference to the R Markdown ecosystem. With R Markdown, you can easily create reproducible data analysis reports, presentations, dashboards, interactive applications, books, dissertations, websites, and journal articles, while enjoying the simplicity of Markdown and the great power of ...