Fall 2021 - STAT 261 D100

Laboratory for Introductory R for Data Science (1)

Class Number: 5111

Delivery Method: In Person


  • Course Times + Location:

    Tu 2:30 PM – 3:20 PM

  • Prerequisites:

    One of STAT 201, STAT 203, STAT 205, STAT 270, BUS 232, or POL 201, with a grade of at least C- or permission of the instructor. Corequisite: STAT 260.



A hands-on application of the R programming language for data science. Using the R concepts covered in STAT 260, students will explore (visualize, transform, and summarize) and wrangle (read and tidy) data. No prior computer programming experience required. Students who have taken STAT 341 or STAT 360 first may not then take this course for further credit.


STAT 261 LABs will start on Tuesday Sept 14th and will run until Wednesday Dec 1st. There will not be any LABs on Wednesday Sept 8th nor Tuesday Dec 7.

Week Number STAT 260 STAT 261
1 Getting started: installing R, RStudio, the tidyverse and other packages, RStudio projects, RMarkdown files and basics In-class exercises for setting up R 
2 and 3 Exploring Data: visualisation Using ggplot to create plots of different types of data 
4 Exploring Data: transformation and summary statistics Plotting transformed data (e.g., bar plots, smoothed functions)
5 Data Wrangling: data frames and tibbles, importing data Reading in data in different formats
6 Data Wrangling: tidy data Cleaning a messy data set
7 Data Wrangling: relational data Linking multiple data sets
8 Data Wrangling: strings Handling text data
9 Data Wrangling: factors, dates and times Handling factors and date and time data
10 Programming: functions Writing functions to minimize code length, prevent bugs, and improve readability
11 Programming: vectors Types of vectors and incorporating vectors in functions
12 Programming: vectors For loops
13 Summary Summary

Mode of teaching:
  • Lecture: BothSynchronous and Asynchronous
  • Lab: Synchronous
  • Quizzes: Synchronous; Date: TBA
  • Final exam: Synchronous; date: TBA
  • Remote invigilation (Zoom, or other approved software) will be used.


  • Quizzes 50%
  • Final Exam 50%



Access to high-speed internet, webcam


R for Data Science, by Garrett Grolemund and Hadley Wickham, available online for free at https://r4ds.had.co.nz/

Department Undergraduate Notes:

Students with Disabilities:
Students requiring accommodations as a result of disability must contact the Centre for Accessible Learning 778-782-3112 or csdo@sfu.ca

Tutor Requests:
Students looking for a tutor should visit hhttps://www.sfu.ca/stat-actsci/all-students/other-resources/tutoring.html. We accept no responsibility for the consequences of any actions taken related to tutors.

Registrar Notes:


SFU’s Academic Integrity web site http://www.sfu.ca/students/academicintegrity.html is filled with information on what is meant by academic dishonesty, where you can find resources to help with your studies and the consequences of cheating.  Check out the site for more information and videos that help explain the issues in plain English.

Each student is responsible for his or her conduct as it affects the University community.  Academic dishonesty, in whatever form, is ultimately destructive of the values of the University. Furthermore, it is unfair and discouraging to the majority of students who pursue their studies honestly. Scholarly integrity is required of all members of the University. http://www.sfu.ca/policies/gazette/student/s10-01.html


Teaching at SFU in fall 2021 will involve primarily in-person instruction, with approximately 70 to 80 per cent of classes in person/on campus, with safety plans in place.  Whether your course will be in-person or through remote methods will be clearly identified in the schedule of classes.  You will also know at enrollment whether remote course components will be “live” (synchronous) or at your own pace (asynchronous).

Enrolling in a course acknowledges that you are able to attend in whatever format is required.  You should not enroll in a course that is in-person if you are not able to return to campus, and should be aware that remote study may entail different modes of learning, interaction with your instructor, and ways of getting feedback on your work than may be the case for in-person classes.

Students with hidden or visible disabilities who may need class or exam accommodations, including in the context of remote learning, are advised to register with the SFU Centre for Accessible Learning (caladmin@sfu.ca or 778-782-3112) as early as possible in order to prepare for the fall 2021 term.