Skip to main content

PH125.1x: Data Science: R Basics - Course Syllabus

Course Instructor

Rafael Irizarry

Course Description

In this first course of eight in the HarvardX Data Science series, we learn the basic building blocks of R.

The demand for skilled data science practitioners in industry, academia, and government is rapidly growing. The Harvard Data Science Series prepares you with the necessary knowledge base and skills to tackle real world data analysis challenges. We cover concepts such as probability, inference, regression and machine learning and develop skill sets such as R programming, data wrangling with dplyr, data visualization with ggplot2, file organization with unix, version control with GitHub, and reproducible document preparation with RStudio. Throughout the series, we use motivating case studies, we ask specific questions and answer these through data analysis. Our assessments use code checking technology that will permit you to get hands-on practice during the courses.

Throughout the series, we will be using the R software environment for all our analysis. You will learn R, statistical concepts, and data analysis techniques simultaneously. In this course, we will introduce basic R syntax to get you going. However, rather than cover every R skill you need, we introduce just enough to get you going with the next courses in this series, which will provide more in depth coverage, building upon what you learn here. We believe that you can better retain R knowledge when you learn it to solve a specific problem.

Using a motivating case study, we ask specific questions related to crime in the United States and provide a relevant dataset. You will learn some basic R skills to permit us to answer these questions.

HarvardX has partnered with DataCamp for all assignments in R that allow students to program directly in a browser-based interface. You will not need to download any special software, but an up-to-date browser is recommended.

What you'll learn:

    • how to read, extract, and create datasets in R
    • how to perform a variety of operations and analyses on datasets using R
    • how to write your own functions/sub-routines in R

New to EdX?

Are you new to edX? Check out edx's Demo Course!

Need help? Visit edX Support via the Support tab or visit the Help Center. You can also leave your comments or questions about R Basics in our course feedback form.

Course Structure

Material will all be released on October 6 at 21:00 UTC. For the first week, we encourage you to meet your peers, learn the DataCamp platform, and tell us about yourselves and what you hope to get out of the course! You can progress through the material at your own pace.


All graded components of the course are DataCamp assignments: The nine programming exercises are worth 100% of your grade.

All other components of the course, such as the the discussion boards, are not for credit.


In order to receive a Verified Certificate, you must sign up and pay for a Verified Certificate by the deadline on the course page and earn a passing grade of at least 70%.


Section 1: R Basics, Functions, and Data Types

You will get started with R and learn about R's functions and data types.

Section 2: Vectors and Sorting

You will learn to operate on vectors and advanced functions such as sorting.

Section 3: Indexing, Data Manipulation, and Plots

You will learn to wrangle, analyze and visualize data.

Section 4: Programming Basics

You will learn to use general programming features like 'if-else', and 'for loop' commands to write your own functions to perform various operations on datasets.


What is the deadline to sign up for a Verified Certificate?

The deadline is listed on the right side of the course landing page.

How do I earn a certificate?

To earn a certificate, you must sign up for a Verified Certificate by the deadline and earn a grade of at least 70%. When you achieve this score, a view your certificate button will appear on your dashboard. For more information, click on this link.

How do I upgrade to a verified certificate?

Go to your edX Dashboard (by clicking the edX icon at the top left of this page). Under this course, click the "Challenge Yourself!" link. The last day to sign up for a verified certificate is .

How long does the course take?

That is up to you! It is 4 weeks of contentJust be aware that the course closes on !

I am doing well on the assessments, but when I look under "Progress" I have a very low grade...why?

The grade is calculated based on all of the assessments you have completed and the assessments that you have not completed (edX says you have a "zero" on those assessments until you have attempted them). You will see your overall grade move up as you progress through the course.

Installing R

For this course, you do not need to install R because we're using DataCamp for all of the assignments. You will learn about how to use datacamp's platform next.

Once you decide to install R, you can download it freely from the Comprehensive R Archive Network (CRAN). It is relatively straightforward, but if you need further help you can try the following resources:


HarvardX pursues the science of learning. When you participate in this course, you will also participate in research about learning. Read our research statement to learn more.