Learning Objectives

  • Familiarize yourself with the structure of RMarkdown documents.
  • Learn some basic text and document formatting.

R Markdown

There are lots of resources for learning RMarkdown. I won’t attempt to cover the process in detail, rather I’ll refer you to explore the following two resources which describe the basics (and more) of RMarkdown:

Online Resources

A nice RMarkdown cheetsheet/tutorial from Dataquest. It’s a good starting point because it’s thorough, but still easy to read.

  • You can skip the step 1: install rmarkdown.

The RMarkdown section of R for Data Science

RStudio’s RMarkdown Page

This page has a nice introduction to YAML headers, including details about setting up a table of contents.

This theme gallery Has lots of good info about R Markdown document themes, including the pre-packaged ones which you’ll most likely want to use since they are compatible with floating tables of contents.

Key Concepts

Some of the key concepts you need to know about are:

  • Document YAML (Yet Another Markdown Language) Headers
  • Output Document Formats
  • Output Themes
  • Tables of Contents
  • Document Section Headers (1st, 2nd, 3rd level headers, etc.)
  • Text, Formatting, and Code Chunks

Instructions

Create a new R notebook for the assignment. Use the document YAML header options to:

  • Make the document title: “R Markdown Documents - Part 1”
  • Make the document’s subtitle: “Analysis of Environmental Data”
  • List your name as the document’s author.
  • Create a floating table of contents.
    • You may need to consult Dr Google or one of the resources listed above for how to do this.
  • (Optional) choose a theme

Create the following sections in the document using 1st level headers. You’ll need to use some basic Markdown formatting syntax to make lists, change font face, etc.

Introduction

Briefly introduce yourself. Put your name in bold text. Put the name of your program or major in italics.

Concepts Lists

Create numbered list with 2 - 4 concepts you’ve already learned in this course. You might want to include things like:

  1. Basic R
  2. Measures of center
  3. 42

Course List

Create a bullet-point list containing 2 - 4 of the favorite courses you’ve taken so far.

For example, some courses that I have enjoyed taking or teaching are:

  • Analysis of Environmental Data (and Lab!)
  • General Botany (many years ago….)
  • Introduction to GIS

Favorite Plot

Finally, create a first-level heading section called My Favorite Plot (so far).

In this section, you’ll create a code chunk in which you’ll re-create the plot you’ve liked the most in the course so far.

Write a brief figure caption and explain why this plot is your favorite.

Report

Once you’re satisfied with how your output html document looks, submit it in the file upload form on the Moodle assignment submission page.

Remember the required first-level sections:

  1. Introduction
  2. Concepts list
  3. Course list
  4. Favorite plot