Since the beginning of the Data Science Specialization, we've noticed the unbelievable passion students have about our courses and the generosity they show toward each other on the course forums. A couple students have created quality content around the subjects we discuss, and many of these materials are so good we feel that they should be shared with all of our students.

We can't wait to see what you've created and where the community can take this site!

- The JHU Data Science Lab Team

Thu 4 Jun 2015 4:30 AM CST

R Programming: Week 1

As you browse the course web site, please make sure to read through the syllabus which contains important information about the grading policy for quizzes and programming assignments as well as the course schedule.

Please pay particular attention to the differences among the various Programming Assignments. Whereas Programming Assignments 1 and 3 are graded via unit tests that use a submission script that will compare the output of your functions to the correct output, Programming Assignment 2 requires that you submit R code for evaluation and grading by your classmates.

This week will cover the basics to get you started up with R. There are videos demonstrating how to install R on Windows and Mac. The Week 1 videos will 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 order that they are listed on the web page, but watching the videos out of order isn't going to ruin the story. For each lecture video you can download a separate PDF document of the slides (the demonstration videos don't have slides associated with them).

Roger Peng and the Data Science Team

Mon 1 Jun 2015 9:01 PM CST

R Programming: Welcome to swirl

In this course, you have the option to use the swirl R package to practice some of the concepts we cover in lectures. swirl teaches you R programming and data science interactively, at your own pace, and right in the R console.

Each lesson that you complete in swirl is worth one extra credit point. However, the maximum number of points you may earn for the assignment is capped at 5. While these lessons will give you valuable practice and you are encouraged to complete as many as possible, please note that they are completely optional and you can get full marks in the class without completing them.

You can find the instructions for how to install and use swirl in the Programming Assignments section of the course under Week 1. Have fun!

Roger Peng and the Data Science Team

Mon 1 Jun 2015 9:01 PM CST

R Programming: Pre-Course Survey

Thanks for signing up for R Programming. As you probably know, this course is part of the Data Science Specialization, a sequence of nine massive open online courses (MOOCs) plus a Capstone project. We would like to learn more about your motives for taking this course and your intentions for both this course and the overall specialization. To help us out, please complete our short pre-course survey. It should only take about 3 minutes of your time.

There will be one quiz every week. The quizzes will all open on the first day of the course but they will be due weekly. So the Week 1 Quiz will be due at the end of the first week and the Week 2 Quiz will be due at the end of the second week, etc.

Please refer to the individual weekly Quiz deadlines to see the exact date and time that each Quiz is due.

Programming Assignments

There will be three required programming assignments. The first programming assignment is due at the end of the second week. Subsequent programming assignments are due weekly after that.

Programming Assignments 1 and 3 will be graded via unit tests using a submission script that will compare the output of your functions to the correct output. To access Programming Assignments 1 and 3, click the corresponding link in the left navigation bar.

Programming Assignment 2 will be submitted differently and graded via a peer assessment. To access Programming Assignment 2, click the corresponding link in the left navigation bar.

swirl Programming Assignment (optional)

In this course, you have the option to use the swirl R package to practice some of the concepts we cover in lectures.

Each lesson that you complete in swirl is worth one extra credit point. However, the maximum number of points you may earn for the assignment is capped at 5. While these lessons will give you valuable practice and you are encouraged to complete as many as possible, please note that they are completely optional and you can get full marks in the class without completing them.

You can find the instructions for how to install and use swirl in the Programming Assignments section of the course under Week 1.

Grading

Quizzes

You may attempt each quiz up to 3 times. The score of your most successful atempt will count toward your grade.

Programming Assignments

Programming assignments 1 and 3 will require submissions via a submission script. You may make an unlimited number of submissions for of the programming assignments 1 and 3, and your most successful submission will count toward your grade. The swirl Programming Assignment is completely optional and extra credit.

The reported due date is the soft deadline for quizzes 1-3 and programming assignment 1. You may turn in quizzes 1-3 and programming assignment 1 up to five days after the soft deadline. The hard deadline is five days after the Quiz is due at 23:30 UTC. If you submit after the due date (but before the hard deadline), your submission score will be penalized by 10% for each day after the due date. If you use a late day, the 10% per day penalty will not be applied for that day.

**Please note: There is no partial credit grace period for Quiz 4 or Programming Assignments 2 and 3. Those deadlines are firm, and work submitted after the hard deadline will not receive credit.

Late Days for Quizzes and Programming Assignment 1

You are permitted a total of 5 late days for quizzes and assignments in the course. If you use a late day, your quiz or assignment grade will not be affected if it is submitted late.

No Late Days for Programming Assignment 2

Peer assessments deadlines have to be synchronous. Therefore, Late Days cannot be applied to Programming Assignment 2. Only one deadline can be set for students to submit and peer-grade each other's work. This is necessary in order to maintain a synchronized peer grading process.

Points and scoring

There are 100 points available in the course. The breakdown of points is as follows:

Week 1 Quiz - 20 points

Week 2 Quiz - 10 points

Week 3 Quiz - 5 points

Week 4 Quiz - 10 points

Programming Assignment 1 (Air Pollution) - 20 points

Programming Assignment 2 (Lexical Scoping) - 10 points

Programming Assignment 3 (Hospital Quality) - 25 points

swirl Programming Assignment - Maximum of 5 extra credit points

You must earn 70 points to pass the course and earn a certificate. Students who earn 90 points and above will receive a certificate with Distinction.

Week 1: Getting Started and R Nuts and Bolts

This week is all about getting started with R and learning some of the basic details of the language. If you haven't already installed R, you should go to the R web site and download R for your platform (Windows, Mac, or Unix/Linux). Also, if you want, you can download RStudio, which is a free interactive development environment designed for R that is very useful and we use quite a bit in the Data Science Specialization. I've made some videos to help you along with the installation process:

Installing R on Windows

Installing R on a Mac

Installing R on RStudio (on a Mac)

Before you start using R, one key concept is the working directory. This is the directory/folder on your computer where you will store project files, data, and code. It's important that you tell R where the working directory is that you will be using so that it knows where to find the appropriate file (the working directory can be any directory on your computer). These videos tell you how to set your working directory:

Setting your working directory (Windows)

Setting your working directory (Mac)

Learning Objectives

By the end of week 1 you should be able to:

Install the R and RStudio software packages

Download and install the swirl package for R

Describe the history of the S and R programming lectures

Describe the differences between atomic data types

Execute basic arithmetic operations

Subset R objects using the "[", "[[", and "$" operators and logical vectors

Describe the explicit coercion feature of R

Remove missing (NA) values from a vector

Programming

There is no official graded programming assignment for this week. However, we have developed a series of exercises to get you started with R. These exercises are implemented using the swirl package for R. You can read the instructions for how to install and use swirl to practice some of the concepts in R.

Introduction to swirl

swirl programming assignment instructions

swirl homepage

The swirl programming assignment is NOT required. However, if you complete the swirl programming assignment you can receive up to 5 extra credit points toward your final class score.