Syllabus

Introduction to R

Louisa H. Smith

Course Description

This 5-session, non-credit course will provide an introduction to R to get you up and running with data management and analysis. Through short lectures, in-class exercises, and take-home challenges, you’ll end up with skills that will make your data tasks easier. The goal is to gain comfort with R, learn some best practices with R, as well as take home code you can modify and re-use. We’ll be covering some of the skills considered the most important by Harvard Chan students in a recent survey (see Figure).

Pre-requisites

No experience with R is expected. This course will be appropriate for new users as well as those who have basic familiarity with R but aren’t comfortable conducting their day-to-day data tasks in R.

Please come to the first class with a laptop with R, RStudio, and the tidyverse package installed. See installation instructions here: http://web.cs.ucla.edu/~gulzar/rstudio/index.html, entering tidyverse as the package name in part 3.

Course Objectives

In this course you will learn to:

Schedule

Day 1: Figures

Day 2: Selecting, filtering, and mutating

Day 3: Grouping and tables

Day 4: Functions

Day 5: Analyze your data

We’ll go through a common workflow for analyzing data, putting together all we’ve learned:

Course readings, exercises, and expectations

There are no required readings for the course. The book R for Data Science by Hadley Wickham and Garrett Grolemund, (freely available online at https://r4ds.had.co.nz) is recommended if you’d like more guidance and practice exercises.

There will be ungraded take-home exercises after every class.

Attendance is expected at each of the 5 class meetings. It is understandable that an emergency might prevent you from attending; in that case, it is expected that you will review the materials you missed.

Harvard Chan Policies and Expectations

Inclusivity Statement

Diversity and inclusiveness are fundamental to public health education and practice. Students are encouraged to have an open mind and respect differences of all kinds. I share responsibility with you for creating a learning climate that is hospitable to all perspectives and cultures; please contact me if you have any concerns or suggestions.

Title IX

The following policy applies to all Harvard University students, faculty, staff, appointees, or third parties: Harvard University Sexual and Gender-Based Harassment Policy. (Procedures For Complaints Against a Faculty Member; Procedures For Complaints Against Non-Faculty Academic Appointees).

Academic Integrity

Each student in this course is expected to abide by the Harvard University and the Harvard T.H. Chan School of Public Health School’s standards of Academic Integrity. All work submitted to meet course requirements is expected to be a student’s own work. In the preparation of work submitted to meet course requirements, students should always take great care to distinguish their own ideas and knowledge from information derived from sources.

Students must assume that collaboration in the completion of assignments is prohibited unless explicitly specified. Students must acknowledge any collaboration and its extent in all submitted work. This requirement applies to collaboration on editing as well as collaboration on substance.

Should academic misconduct occur, the student(s) may be subject to disciplinary action as outlined in the Student Handbook. See the Student Handbook for additional policies related to academic integrity and disciplinary actions.

Accommodations for Students with Disabilities

Harvard University provides academic accommodations to students with disabilities. Any requests for academic accommodations should ideally be made before the first week of the semester, except for unusual circumstances, so arrangements can be made. Students must register with the Local Disability Coordinator in the Office for Student Affairs to verify their eligibility for appropriate accommodations. Contact Colleen Cronin in all cases, including temporary disabilities.

Religious Holidays, Absence Due to According to Chapter 151c, Section 2B, of the General Laws of Massachusetts, any student in an educational or vocational training institution, other than a religious or denominational training institution, who is unable, because of his or her religious beliefs, to attend classes or to participate in any examination, study, or work requirement on a particular day shall be excused from any such examination or requirement which he or she may have missed because of such absence on any particular day, provided that such makeup examination or work shall not create an unreasonable burden upon the School. See the Student Handbook for more information.

Figure

Making figures was rated the most important skill to learn in a recent student survey (figure made with ggplot2 package).

Making figures was rated the most important skill to learn in a recent student survey (figure made with ggplot2 package).