Practical Overview


Package Loading


As mentioned within the Learning Material & Getting Started section, install and load the following function(s).

  library(rmarkdown)
  library(tidyverse)


During this session, we will not be using any additional data, rather only using those data sets available through the tidyverse.


Section 1: Rmarkdown Basics


Exercise 1: Open a new R markdown presentation & create 4 empty normal slides, and load the tidyverse library into the presentation


Exercise 2: Load the data set msleep, from the tidyverse package & on the first slide, bullet point any 10 of the animals


Exercise 3: On the second slide, numerically list the top 5 heaviest animals


Section 2: Specifying Metadata


Exercise 4: In the metadata, specify the following:

  • title: “Mammals Sleep Dataset”
  • output: ioslides_presentation

Exercise 5: In addition, ensure that bullet points are displayed incrementally & reduce the font size.



Section 3: Structuring Presentations


Exercise 6: Restructure the first slide to divide it into 2 columns, 5 animals in each column


Exercise 7: Center the text in the second slide


Exercise 8: Convert the third slide to a Heading slide, labelled Sleep Relationships.



Section 4: Code & Script in Presentations


Exercise 9: Insert a code chunk on slide 4, displaying a summary of columns 3 to 8 of msleep data, ensure to include the code on the slide.


Exercise 10: Insert a code chunk on slide 5, which displays a scatter plot between brain weight and body weight. Which does not include the code on the slide.


Exercise 11: Edit the metadata on slide 5, so that all the code can be seen and the text is built incrementally



Section 5: Pre-built Presentations Themes


Exercise 12: Change the output of the presentation to: beamer_presentation.


Exercise 13: Looking on the sites mentioned, add in a theme, colortheme and fonttheme.




Section 6: Exporting Presentations


Exercise 14: Export the presentation through ioslide as a HTML


Exercise 15: Export the presentation through beamer as a PDF