R Programming Roger D. Peng  Course Description 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, discuss 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, and organizing and commenting R code. Topics in statistical data analysis and optimization will provide working examples.  Course Content Week 1: Overview of R, R data types and objects, reading and writing data Week 2: Control structures, functions, scoping rules, dates and times Week 3: Loop functions, debugging tools Week 4: Simulation, code profiling Lecture Materials Lecture videos will be released weekly and will be available for the week and thereafter. You are welcome to view them at your convenience. Accompanying each video lecture will be a PDF copy of the slides and a link to an HTML5 version of the slides.  Background lectures Background lectures about the content of the course with respect to other quantitative courses, course logistics, and the R programming language are provided as reference material. It is not necessary to watch the videos to complete the course, however you may find them useful.  Assessments Quizzes 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.  Hard deadlines and soft deadlines for Quizzes 1-3 and Programming Assignment 1 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.  Anonymity As part of this class you will be required to set up a GitHub account. Github is a tool for collaborative code sharing and editing. During this course and other courses in the track you will be submitting links to files you publicly place in your Github account as part of peer evaluation. If you are concerned about preserving your anonymity you should set up an anonymous Github account and be careful not to include any information you do not want made available to peer evaluators.  Typos We are prone to a typo or two - please report them and we will try to update the notes accordingly. In some cases, the videos may still contain typos that have been fixed in the lecture notes. The lecture notes represent the most up-to-date version of the course material. Differences of opinion Please refrain from angry, sarcastic, or abusive comments on the message boards. Our goal is to create a supportive community that helps the learning of all students, from the most advanced to those who are just seeing this material for the first time.  Peer Assessment For many of the course projects in the Data Science Specialization, peer assessment is necessary to evaluate the completion of the assignments. We have created and tested rubrics for each assignment. They are not perfect and will not be perfectly applied. However, we believe that the feedback from peer assessment adds value above simple multiple choice assessments.  We have tried to make the criteria as objective as possible, do your best to apply them to the best of your abilities. If you disagree with the scores you received through peer review, you may report those issues in the "Grading Issues" forum. Please note that it will be impossible for us to revise peer-grades, but we will attempt to use reports to improve future versions of the rubric. Plagiarism Johns Hopkins University defines plagiarism as "...taking for one's own use the words, ideas, concepts or data of another without proper attribution. Plagiarism includes both direct use or paraphrasing of the words, thoughts, or concepts of another without proper attribution." We take plagiarism very seriously, as does Johns Hopkins University.  We recognize that many students may not have a clear understanding of what plagiarism is or why it is wrong. Please see the following guide for more information on plagiarism:  JHU Student Handbook on Referencing  It is critically important that you give people/sources credit when you use their words or ideas. If you do not give proper credit -- particularly when quoting directly from a source -- you violate the trust of your fellow students.  The Coursera Honor code includes an explicit statement about plagiarism:  I will register for only one account. My answers to homework, quizzes and exams will be my own work (except for assignments that explicitly permit collaboration). I will not make solutions to homework, quizzes or exams available to anyone else. This includes both solutions written by me, as well as any official solutions provided by the course staff. I will not engage in any other activities that will dishonestly improve my results or dishonestly improve/hurt the results of others.  Reporting plagiarism on course projects One of the criteria in the project rubric focuses on plagiarism. Keep in mind that some components of the projects will be very similar across terms and so answers that appear similar may be honest coincidences. However, we would appreciate if you do a basic check for obvious plagiarism and report it during your peer assessment phase.  It is currently very difficult to prove or disprove a charge of plagiarism in the MOOC peer assessment setting. We are not in a position to evaluate whether or not a submission actually constitutes plagiarism, and we will not be able to entertain appeals or to alter any grades that have been assigned through the peer evaluation system.  But if you take the time to report suspected plagiarism, this will help us to understand the extent of the problem and work with Coursera to address critical issues with the current system.  Technical Information Regardless of your platform (Windows or Mac) you will need a high-speed Internet connection in order to watch the videos on the Coursera web site. It is possible to download the video files and watch them on your computer rather than stream them from Coursera and this may be preferable for some of you.  Here is some platform-specific information: Windows  The Coursera web site seems to work best with either the Chrome or the Firefox web browsers. In particular, you may run into trouble if you use Internet Explorer. The Chrome and Firefox browsers can be downloaded from:  Chrome: http://www.google.com/chrome Firefox: http://www.mozilla.org Mac  The Coursera site appears to work well with Safari, Chrome, or Firefox, so any of these browsers should be fine.