Assignment Overview

Each assignment has a similar format and follows a similar workflow. The following figure describes how the files in the repos interact.

Each assignment repo has the following files within:

├── reference_report.html
├── main.R
├── README.md
├── report.Rmd
└── test_main.R
  • reference_report.html - This is the completed “report” of the assignment. You will be endeavoring to replicate this while completing the assignment, with some room for creative differences in elements like plotting.

  • main.R - This is the main R script in the assignment, where you will be doing a lot of your programming. This script contains function definitions and descriptions, but with functions that are empty. Complete the functions as described in the script and ensure they pass the tests.

  • README.md - Every repository should have a README. Usually it contains useful information about installation, usage, and licensing. In this case, it will have helpful links back to assignment instructions.

  • report.Rmd - Another empty file, this markdown script will source() your main.R script, loading the functions into its environment. There will be empty code blocks throughout this document, use the functions you developed in main.R to replicate the figures or match the captions seen in finalized_report.pdf.

  • test_main.R - This is a completed testing script produced by us to help you quickly determine how will your code is running. This file sources your main.R file, meaning it runs it to completion and stores any functions and variables in the active environment. It then runs tests to ensure your functions are working in a predictable way. Tests are incredibly valuable tools, and potentially one of the strongest in a programmer’s toolkit.

Most assignments beyond assignment 1 have a complementary guide hosted on the website page. These go into more background about how functions and tests work so use them if you’re feeling stuck or would like more context.