R Programming

11,146 ratings
2,400 reviews

Course 2 of 10 in the Data Science Specialization

In this course you will learn how to program in R and how to use R for effective data analysis. You will learn how to install and configure software necessary for a statistical programming environment and describe generic programming language concepts as they are implemented in a high-level statistical language. The course covers practical issues in statistical computing which includes programming in R, reading data into R, accessing R packages, writing R functions, debugging, profiling R code, and organizing and commenting R code. Topics in statistical data analysis will provide working examples.

Только онлайн-курс

Начните сейчас и учитесь по собственному графику.
Intermediate Level

Промежуточный уровень


Прибл. 20 ч. на завершение

Предполагаемая нагрузка: 7 hours/week
Comment Dots


Субтитры: English, French, Chinese (Simplified), Vietnamese, Japanese

Чему вы научитесь

  • Check
    Collect detailed information using R profiler
  • Check
    Configure statistical programming software
  • Check
    Make use of R loop functions and debugging tools
  • Check
    Understand critical programming language concepts

Приобретаемые навыки

R ProgrammingData AnalysisDebuggingGithub

Только онлайн-курс

Начните сейчас и учитесь по собственному графику.
Intermediate Level

Промежуточный уровень


Прибл. 20 ч. на завершение

Предполагаемая нагрузка: 7 hours/week
Comment Dots


Субтитры: English, French, Chinese (Simplified), Vietnamese, Japanese

Syllabus - What you will learn from this course


25 hours to complete

Week 1: Background, Getting Started, and Nuts & Bolts

This week covers the basics to get you started up with R. The Background Materials lesson contains information about course mechanics and some videos on installing R. The Week 1 videos cover the history of R and S, go over the basic data types in R, and describe the functions for reading and writing data. I recommend that you watch the videos in the listed order, but watching the videos out of order isn't going to ruin the story. ...
28 videos (Total 129 min), 9 readings, 8 quizzes
Video28 videos
Installing R on Windows3m
Installing R Studio (Mac)1m
Writing Code / Setting Your Working Directory (Windows)7m
Writing Code / Setting Your Working Directory (Mac)7m
Overview and History of R16m
Getting Help13m
R Console Input and Evaluation4m
Data Types - R Objects and Attributes4m
Data Types - Vectors and Lists6m
Data Types - Matrices3m
Data Types - Factors4m
Data Types - Missing Values2m
Data Types - Data Frames2m
Data Types - Names Attribute1m
Data Types - Summary0m
Reading Tabular Data5m
Reading Large Tables7m
Textual Data Formats4m
Connections: Interfaces to the Outside World4m
Subsetting - Basics4m
Subsetting - Lists4m
Subsetting - Matrices2m
Subsetting - Partial Matching1m
Subsetting - Removing Missing Values3m
Vectorized Operations3m
Introduction to swirl1m
Reading9 readings
Welcome to R Programming10m
About the Instructor10m
Pre-Course Survey10m
Course Textbook10m
Course Supplement: The Art of Data Science10m
Data Science Podcast: Not So Standard Deviations10m
Getting Started and R Nuts and Bolts10m
Practical R Exercises in swirl Part 110m
Quiz1 practice exercises
Week 1 Quiz40m


12 hours to complete

Week 2: Programming with R

Welcome to Week 2 of R Programming. This week, we take the gloves off, and the lectures cover key topics like control structures and functions. We also introduce the first programming assignment for the course, which is due at the end of the week....
13 videos (Total 91 min), 3 readings, 5 quizzes
Video13 videos
Control Structures - If-else1m
Control Structures - For loops4m
Control Structures - While loops3m
Control Structures - Repeat, Next, Break4m
Your First R Function10m
Functions (part 1)9m
Functions (part 2)7m
Scoping Rules - Symbol Binding10m
Scoping Rules - R Scoping Rules8m
Scoping Rules - Optimization Example (OPTIONAL)9m
Coding Standards8m
Dates and Times10m
Reading3 readings
Week 2: Programming with R10m
Practical R Exercises in swirl Part 210m
Programming Assignment 1 INSTRUCTIONS: Air Pollution10m
Quiz2 practice exercises
Week 2 Quiz20m
Programming Assignment 1: Quiz20m


10 hours to complete

Week 3: Loop Functions and Debugging

We have now entered the third week of R Programming, which also marks the halfway point. The lectures this week cover loop functions and the debugging tools in R. These aspects of R make R useful for both interactive work and writing longer code, and so they are commonly used in practice....
8 videos (Total 61 min), 2 readings, 4 quizzes
Video8 videos
Loop Functions - apply7m
Loop Functions - mapply4m
Loop Functions - tapply3m
Loop Functions - split9m
Debugging Tools - Diagnosing the Problem12m
Debugging Tools - Basic Tools6m
Debugging Tools - Using the Tools8m
Reading2 readings
Week 3: Loop Functions and Debugging10m
Practical R Exercises in swirl Part 310m
Quiz1 practice exercises
Week 3 Quiz10m


11 hours to complete

Week 4: Simulation & Profiling

This week covers how to simulate data in R, which serves as the basis for doing simulation studies. We also cover the profiler in R which lets you collect detailed information on how your R functions are running and to identify bottlenecks that can be addressed. The profiler is a key tool in helping you optimize your programs. Finally, we cover the str function, which I personally believe is the most useful function in R....
6 videos (Total 42 min), 4 readings, 5 quizzes
Video6 videos
Simulation - Generating Random Numbers7m
Simulation - Simulating a Linear Model4m
Simulation - Random Sampling2m
R Profiler (part 1)10m
R Profiler (part 2)10m
Reading4 readings
Week 4: Simulation & Profiling10m
Practical R Exercises in swirl Part 410m
Programming Assignment 3 INSTRUCTIONS: Hospital Quality10m
Post-Course Survey10m
Quiz2 practice exercises
Week 4 Quiz20m
Programming Assignment 3: Quiz20m
Direction Signs


started a new career after completing these courses


got a tangible career benefit from this course


got a pay increase or promotion

Top Reviews

By WHFeb 3rd 2016

"R Programming" forces you to dive in deep.\n\nThese skills serve as a strong basis for the rest of the data science specialization.\n\nMaterial is in depth, but presented clearly. Highly recommended!

By EJJul 12th 2016

Excellent course! I already knew a lot about R - but this class helped me solidify what I already knew, taught me lots of new tricks, and now I have a certificate that says I know `something' about R!



Roger D. Peng, PhD

Associate Professor, Biostatistics

Jeff Leek, PhD

Associate Professor, Biostatistics

Brian Caffo, PhD

Professor, Biostatistics

About Johns Hopkins University

The mission of The Johns Hopkins University is to educate its students and cultivate their capacity for life-long learning, to foster independent and original research, and to bring the benefits of discovery to the world....

Frequently Asked Questions

  • Once you enroll for a Certificate, you’ll have access to all videos, quizzes, and programming assignments (if applicable). Peer review assignments can only be submitted and reviewed once your session has begun. If you choose to explore the course without purchasing, you may not be able to access certain assignments.

  • If you pay for this course, you will have access to all of the features and content you need to earn a Course Certificate. If you complete the course successfully, your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile. Note that the Course Certificate does not represent official academic credit from the partner institution offering the course.

  • Yes! Coursera provides financial aid to learners who would like to complete a course but cannot afford the course fee. To apply for aid, select "Learn more and apply" in the Financial Aid section below the "Enroll" button. You'll be prompted to complete a simple application; no other paperwork is required.

More questions? Visit the Learner Help Center