Your hub for information related to assignments.


Here are the deadlines for assignments, with links (to appear after assignments are released).

A GitHub Issue will be posted in the Announcements repo whenever a new assignment is released. The students will be tagged too, so you should get an email notification with it as well.

All submissions are due by 23:59. I highly recommend aiming to finish before the last lecture so that we can help you if need be!


Assignment Assignment Due Date
Assignment 01 September 17, 2019
Assignment 02 September 24, 2019
Assignment 03 October 01, 2019
Assignment 04 October 08, 2019
Assignment 05 October 17, 2019


Assignment Assignment Due Date
Assignment 06
Assignment 07
Assignment 08
Assignment 09
Assignment 10


The assignments make use of UBC MDS’s rubrics. Within each assignment, we let you know which rubrics are being used and where, along with their weighting. Each rubric typically has six “levels” defined by letter grades, which map to the following percentages as defined by UBC:

Category Grade Range
No attempt (0) 0
Poor (F) 0 - 49%
Unsatisfactory (D) 50% - 54%
Satisfactory (C- to C+) 55% - 67%
Good (B- to B+) 68% - 79%
Excellent (A- to A+) 80% - 100%

Setting up your homework repository

Your assignments will be developed and submitted to a single repository created by GitHub Classroom (note that this is different from your participation repository). To create the repository, just follow this link, and follow the instructions. Your homework repository will be created for you in the STAT545-UBC-hw-2019-20 Organization under the name STAT545-hw-<your username>. You only have to do this once.

FYI: This repository is public.

Working on your homework

As you work on your assignment, you should commit and push your progress to GitHub. As a word of advice:

Commit your work often!

Commit your work often!

Commit your work often!

Too many times, I see students wait until they finish their assignments to commit and push to GitHub. This is a very bad idea for at least two reasons:

  1. If you submit your work late, we are forced to give you the late penalty. But if you’ve been committing your work, we can at least look at your repo as it was after the latest commit before the deadline.
  2. Your workflow will not be as effective as it could be by using version control.

Tidy Submission

Each assignment will have some marks set aside for a “tidy” submission, which is defined here. If there’s any further uncertainty in determining a grade for the tidy submission portion, the UBC MDS mechanics rubric will be referred to.

Before submitting your work, make sure it’s tidy:

  • Each assignment should be self-contained in a folder within your STAT 545A homework repository, found in the hw Org.
    • Special case for Assignment 01, which also evaluates your repo’s file.
  • Your work must be reproducible from beginning to end. That is, a member of the teaching team should be able to run all code error-free and reproduce the output files.
  • Your scripts do not contain code that installs packages (this is not good practice anyway) – note that this is different from loading packages with the library() function, which is good!
  • All R Markdown files are knitted to an output readable on GitHub (probably github_document or pdf_document). a readable output. This means linking to HTML files if you make them (see section on “Viewing and linking to HTML files”). You can also knit to output: github_document if you want a markdown file that renders nicely for GitHub.

Here is how you submit your homework:

  1. If you’re working locally (i.e., on your hard drive), push your work to your GitHub homework repository.
  2. On your GitHub homework repository, tag a release.
    • As a “tag version”, we recommend putting hw1.0 for assignment 1, hw2.0 for assignment 2, etc.
    • If you want to make changes to your release before the deadline, just tag a new release like hw1.1.
  3. Go to the course page on UBC canvas, and find the corresponding assignment submission. Submit a URL to the latest release of your assignment.
    • You can find this by clicking on the “release” button on your GitHub homework repository, on (for example) the hw1.0 text.

Viewing and linking to HTML files

Viewing an HTML file on GitHub only shows you the HTML code, not the rendered script. You’ll need to provide a link to a rendered, viewable version of each HTML file you produce. Here’s how you do that using GitHub Pages:

  1. Enable “GitHub pages” on your repo:
    • Go to “settings” on your repo, and stay on the default “Options” tab.
    • Scroll down to the “GitHub Pages” section.
    • Under “Source”, click the “None” drop-down button, and select the branch you want to turn into a website (probably “Master”).
  2. Also under the “GitHub Pages” section, you’ll find your website URL. Make note of this URL.
    • This URL will show a rendered version of your repo’s README, but this is not important.

Just by enabling GitHub Pages, your HTML files are now viewable rendered by your browser. Technically, you just turned your GitHub repo into a website. The only trick is navigating to that HTML page, since there’s no default interface to your website.

  1. Obtain the URL to HTML file on your repo:
    • Start with your GitHub Pages URL that you made note of in Step 2. This points to the root of your repository.
    • Get the path to an HTML file you want to view. It should be something like /path/to/file.html (in this case, file.html lives in the to folder, which lives in the path folder in the root of your repo).
    • Append the path to the HTML file to your GitHub Pages URL. Try the URL to see that it works.
  2. Make it easy for a visitor to your repo to find the rendered HTML file! Add a link to the rendered HTML file somewhere in your repo, probably in a README file in your homework folder.