Instructor: Charles Lanfear
Note for the time being there will be no in-person meetings or office hours.
Zoom (848-704-242): Wednesdays 3:30-5:20
Lab (Optional but highly recommended)
Zoom (848-704-242): Mondays 3:30-5:20
This course is intended to give students a foundational understanding of programming in the statistical language R. This knowledge is intended to be broadly useful wherever you encounter data in your education and career. General topics we will focus on include:
By the end of this course you should feel confident approaching any data you encounter in the future. We will cover virtually no statistics, however it is the intention that this course will leave you prepared to progress in CSSS or STAT courses with the ability to focus on statistics instead of coding. Additionally, I hope the basic concepts you learn will be applicable to other programming languages and research in general, such as logic and algorithmic thinking.
No specific courses are required and I anticipate this will be the first course in which most students encounter programming. Programming is difficult and can be learned effectively only through time, effort, and exposure. Trial and error is a key aspect of learning to code and you will always find yourself searching for answers or asking for help. Therefore the only prequisites for this course are the capability to work hard at something difficult and a willingness to ask for help and provide help when asked.
The course website is accessible without a UWnetID and features all of the slides, R code, and assignments. It will be updated continually throughout the quarter, and available in full after the term has ended as a reference.
Lab time is scheduled on Zoom (848-704-242) on Mondays from 3:30 to 5:20. Attendance is optional for labs and this time should be considered a form of extended office hours and collaborative work time. You are highly encouraged to attend and ask questions about homework, lectures, or programming in R in general. Beginning in week 5, we will walk through homeworks in lab. This gives students an opportunity to be guided through more challenging tasks.
This course features both a Slack channel and a mailing list for obtaining extra help. As you develop your skills, you will find that learning how to ask questions well makes finding answers much easier. Please note that this course has a large number of students but no teaching assistant, so students are encouraged and expected to assist one another with technical problems, both in and out of class. Diagnosing problems in others’ code is a very effective way to improve your understanding of programming.
This course features a mailing list for asking questions. I encourage
you to use this list as your primary means of answering long technical questions. To use the mailing list, address your email to
and it will be sent to the instructor and all students in the class. Unless you specifically
request otherwise, emailed questions directed to me (firstname.lastname@example.org) that may be useful to others in the class will be answered with a response to the class mailing list.
We will also use a Slack channel for communication.
You may ask and answer questions in the Slack channel instead of the mailing list.
Slack is best-suited for short technical questions or extended conversations.
@uw.edu email must be used to register for the channel.
This course is graded as credit / no credit. To pass you need to receive at least 60% of the available points. There will be approximately 7 graded homeworks, one nearly every week. There are 4 points possible for each week that features a homework.
These must be turned in as knitted markdown documents which we will learn to create and for which templates are provided. They will be graded on a 0 to 3 point scale based on a simple effort-focused rubric found on the course website. These are designed first and foremost to develop skills rather than “prove” you have learned concepts. I encourage you to communicate and work together, so long as you write and explain your code yourself and do not copy work wholesale. You can learn a lot from replicating others’ code but you will learn nothing if you copy it without knowing how it works.
Each week an assignment is due, students will be randomly assigned to grade another student’s assignment following the 0 to 3 rubric. They will be expected to provide constructive feedback and commentary if something new was learned; reading others’ code is an important skill and you will write better code knowing others will see it. These reviews will be due midnight prior to the following class meeting. Each peer review is worth 1 point and will be evaluated by the instructor on a binary “good” / “not good” scale.
There are no texts you are required to purchase for this course. The main recommended texts are available online:
R for Data Science by Garrett Grolemund and Hadley Wickham, a great general introduction to R programming for data management and analysis.
Advanced R by Hadley Wickham, a deeper look into programming in R.
The R Inferno by Patrick Burns, an amusing look at unintuitive, frustrating, and confusing elements of R programming and how to overcome them with best practices. To quote, “If you are using R and you think you’re in hell, this is a map for you.”
Additional recommended readings will be posted on the website over the term. The following books or resources are recommended and may prove useful. If purchasing, remember to shop around and avoid previous editions as R is a constantly maturing language:
Hands on Programming with R by Garrett Grolemund, an introduction to R focused on learning to program.
The Art of R Programming by Norman Matloff, a highly readable general text on programming in R.
by Paul Murrell, the definitive text on graphics in R. Vital if you want
to get deeper into
grid (the system underlying
RStudio Cheat Sheets: Handy reference sheets covering a variety of common R tasks and packages.
R-Bloggers: A blog of news and tutorials about R with multiple updates per day and thousands of archived posts.
StackOverflow, the internet’s largest programming help community. Nearly any question you have about programming in R has probably already been asked and answered here, and if not, this is the place to ask.
This is a course in R programming, so you will be expected to use R. You are welcome
to use lab computers, however R and RStudio are free software, so you are strongly
urged to use your own computer so that you will be more comfortable and have easy
access. In terms of R packages, this course will emphasize the
tidyverse family of
packages for manipulating and displaying data. You can acquire R from the
Comprehensive R Archive Network (CRAN) and RStudio from
the RStudio home page (you want
the free RStudio desktop version). The instructor can provide support with installing
R or RStudio in office hours or over email.
Washington state law requires that UW develop a policy for accommodation of student absences or significant hardship due to reasons of faith or conscience, or for organized religious activities. The UW’s policy, including more information about how to request an accommodation, is available at Religious Accommodations Policy. Accommodations must be requested within the first two weeks of this course using the Religious Accommodations Request form.
Your experience in this class is important to me. If you have already established accommodations with Disability Resources for Students (DRS), please communicate your approved accommodations to me at your earliest convenience so we can discuss your needs in this course. If you have not yet established services through DRS, but have a temporary health condition or permanent disability that requires accommodations (conditions include but not limited to; mental health, attention-related, learning, vision, hearing, physical or health impacts), you are welcome to contact DRS at 206-543-8924 or email@example.com or disability.uw.edu. DRS offers resources and coordinates reasonable accommodations for students with disabilities and/or temporary health conditions. Reasonable accommodations are established through an interactive process between you, your instructor(s) and DRS. It is the policy and practice of the University of Washington to create inclusive and accessible learning environments consistent with federal and state law.