An introduction to programming using a language called R, a popular language for statistical computing and graphics in data science and other domains. Learn to use RStudio, a popular integrated development environment (IDE). Learn to represent real-world data with vectors, matrices, arrays, lists, and data frames. Filter data with conditions, via which you can analyze subsets of data. Apply functions and loops, via which you can manipulate and summarize data sets. Write functions to modularize code and raise exceptions when something goes wrong. Tidy data with R’s tidyverse and create colorful visualizations with R’s grammar of graphics. By course’s end, learn to package, test, and share R code for others to use. Assignments inspired by real-world data sets.
Watch an introduction
How to Take this Course
Even if you are not a student at Harvard, you are welcome to “take” this course for free via this OpenCourseWare by working your way through the course’s seven weeks of material. If you’d like to submit the course’s problem sets and final project for feedback, be sure to create an edX account, if you haven’t already. Ask questions along the way via any of the course’s communities!
- If interested in a verified certificate from edX, enroll at cs50.edx.org/r instead.
- If interested in transfer credit and accreditation from Harvard Extension School, register at web.dce.harvard.edu/extension/csci/e/5a instead.
- If interested in transfer credit and accreditation from Harvard Summer School, register at web.dce.harvard.edu/summer/csci/s/5a instead.
How to Teach this Course
If you are a teacher, you are welcome to adopt or adapt these materials for your own course, per the license.