Harvard

Harvard CS50 R: Free R Programming Course

Learn R with Harvard’s free CS50 course: work with data, create visualisations, test code and build a final project using free R and RStudio tools.

CS50 Introduction to Programming with R, with an R symbol and illustrative data charts.

Learn to turn data into useful results with CS50’s Introduction to Programming with R, Harvard’s free course in R programming. Start with the building blocks of code, then explore how to organise information, create clear visualisations and develop reusable functions. The course connects programming concepts to assignments inspired by real-world datasets, giving you opportunities to put each idea into practice.

Whether you want to explore research data or move beyond manual spreadsheet tasks, CS50R offers a structured foundation. Its focus extends from working with data to testing and packaging your own programs, so you can understand both what your code does and how to make it easier to reuse.

Course at a glance

Provider Harvard
Platform CS50 OpenCourseWare
Level Beginner
Language English
Course structure Seven weeks of material and a final project
Access Free learning materials and free local R/RStudio tools
Recognition Free CS50 Certificate after at least 70% on every required problem and the final project
Accounts Free edX and GitHub accounts for the submission and certificate workflow

What you’ll learn

Work through the lessons and assignments to build the foundations for these practical tasks:

  • Represent and explore data: use R data structures, including vectors and data frames, to organise information and work with values from CSV files.
  • Transform datasets: apply conditions, functions and loops to select records, calculate summaries and handle repeated operations.
  • Prepare data with the tidyverse: select columns, filter and sort rows, group observations and reshape data into a useful structure.
  • Create informative charts: use ggplot2 to map data to visual elements, choose scales and add labels that help explain a result.
  • Write and test reusable code: develop functions, handle errors and use unit tests to check how your programs behave.
  • Build an R package: bring functions, documentation and tests together in a final project that others can use.

Skills you’ll gain

  • R programming
  • Data structures
  • Functions and control flow
  • Tidyverse data preparation
  • Data visualisation
  • Unit testing
  • R package development

Who this course is for

CS50R is a useful starting point for new programmers interested in working with data, as well as learners who want a guided introduction to R. You do not need to complete CS50x first; you can take this course before, alongside or after it.

Students, researchers and people exploring data-focused projects may find the combination of programming, data preparation and visualisation especially relevant. The course concentrates on R programming; a broader study of statistics or data science would require additional learning.

How the course works

The seven units progress from representing and transforming data to applying functions, tidying datasets and visualising results. The final two units introduce program testing and packaging. Each stage adds a different part of the workflow: first you work with information, then you learn how to organise the code behind that work.

Lectures explain the concepts, while notes, code examples and selected short videos help you revisit them. Problem sets give you a chance to write programs yourself. Build time for that practice into your schedule: seven weeks describes the organisation of the material, rather than a fixed completion time for every learner.

The final project is your own R package, with functions, documentation and tests. It brings the course together in a practical piece of software and lets you choose a problem that interests you. Follow the project specification when planning what to build and how to submit it.

Free access and certificate

The public OpenCourseWare materials are free to explore. For practice on your computer, install R and the open-source edition of RStudio Desktop using the course’s setup instructions. These provide a free local learning route without a software subscription or temporary trial.

To submit assessed work and pursue the free CS50 Certificate, use free edX and GitHub accounts and follow the course’s registration and gradebook instructions. Choose the free or audit option when registering with edX.

The certificate requires at least 70% on every required problem and the final project. Watching the lectures alone is not enough. Once you meet the requirements, use your CS50 gradebook to claim it. The free certificate records course completion; it is not an accredited Harvard academic qualification.

Enroll Now

Frequently asked questions

Is CS50R free, including the practice tools?

Yes. You can study the OpenCourseWare materials and practise locally with free R and open-source RStudio Desktop.

Do I need to complete CS50x before starting?

No. CS50R can be taken before, alongside or after CS50x, and the opening lecture welcomes new programmers.

Does the free certificate award academic credit?

The free CS50 Certificate is not an accredited academic offering. This learning route does not promise university credit.

Share this course

Questions & discussion

Share a useful question or correction. Comments appear after moderation. Please avoid personal or sensitive information.

Add to the discussion

Your email address will not be published. Required fields are marked *