/Course-Files

Course Files for Intro to R in the Spring 2019 Semester

Primary LanguageR

Intro to R Course

Rationale:

Many students participate in research at some point during their time at Cornell. Data analysis is an important part of the research process and learning to code can help students be more engaged in the data analysis phase of research or enhance their own independent research. The goal of this short course is to introduce R as a data analysis and visualization tool to students interested in research.

Course Aims and Outcomes:

Aims

The course will equip students with skills to perform data analysis and visualization in R for research in efficient, repeatable, and reliable ways.

Specific Learning Outcomes:

By the end of this course, students will understand the basics of importing and formatting data, be able to write functions, loops, use logical operators, generate plots, and debug or troubleshoot code. Students will work with a dataset (of their choosing) for the duration of the course to mimic the process of data analysis and visualization conducted by researchers.

Format and Procedures:

Lessons

Each lesson will use a hands-on approach to coding. Each week the instructor will guide students through the activity for each class in a video posted to blackboard. Students are expected to “code-along”, watching what the instructor does and doing the same on their own computer. We will generate code and solutions together over the course of the class. Instructional videos will work with dataset “AirQuality.csv” available on blackboard.

Practice Assignments

As mentioned above students will choose a dataset to work on throughout the course. Each week students will be expected to complete a short assignment to practice the skills learned in class. Students will use the dataset they chose to demonstrate that they can implement the skills or tools demonstrated in the lesson. These practice assignments should move students towards building code to analyze and visualize their dataset in a meaningful and interesting way. Code from practice assignments should be submitted to GitHub classroom by XX at XX each week.

Peer Feedback

Each week students will be expected to provide at least 2 feedback posts to their peers via GitHub. This feedback may include (but is not limited to) questions, suggestions, comparisons, etc. Feedback should always be respectful and constructive. The failure to maintain a constructive and inclusive learning environment will result in a 0 for feedback that week at the first violation and a 0 for feedback for the semester at the second violation. Peer feedback should be posted by XX at XX each week.

Final Code and Report

Practice assignments throughout the semester will be working towards analyzing the dataset chosen by students. The final project consists of two parts: the final code and the final written report. The code will be a clean and complete record of all steps taken to analyze and plot the data. The final report will be a clear explanation of the dataset, the steps taken to analyze the data. The report should include at least 2 plots as well as explanations of those plots to display interesting trends or relationships in the data. As the final project nears there will be additional details concerning formatting provided. As a group we will decide when final project will be due.

Course Requirements:

Required Computing Equipment: All students are expected to have access to a computer with internet access in class for the duration of the course. All students are expected to have downloaded R and RStudio which are available free of charge online. Students are expected to have or create an account on GitHub which is free of charge.

Grading Procedures:

  1. Weekly Practice Assignments (60%)
  2. Weekly Feedback to Peers (20%)
  3. Final Code and Report (20%)

Academic Integrity

Each student in this course is expected to abide by the Cornell University Code of Academic Integrity. Any work submitted by a student in this course for academic credit will be the student's own work.

You are encouraged to study and work together and to discuss information and concepts covered in lecture and the sections with other students. You can give "consulting" help to or receive "consulting" help from such students. However, this permissible cooperation should never involve one student having possession of a copy of all or part of work done by someone else, in the form of an e-mail, an e-mail attachment file, a diskette, or a hard copy.

Should copying occur, both the student who copied work from another student and the student who gave material to be copied will both automatically receive a zero for the assignment. Penalty for violation of this Code can also be extended to include failure of the course and University disciplinary action.

Accommodations for students with disabilities

In compliance with the Cornell University policy and equal access laws, I am available to discuss appropriate academic accommodations that may be required for student with disabilities. Requests for academic accommodations are to be made during the first three weeks of the semester, except for unusual circumstances, so arrangements can be made. Students are encouraged to register with Student Disability Services to verify their eligibility for appropriate accommodations.

Inclusivity Statement

We understand that our members represent a rich variety of backgrounds and perspectives. I am committed to providing an atmosphere for learning that respects diversity. While working together to build this community we ask all members to: • share their unique experiences, values and beliefs • be open to the views of others • honor the uniqueness of their colleagues • appreciate the opportunity that we have to learn from each other in this community • value each other’s opinions and communicate in a respectful manner • keep confidential discussions that the community has of a personal (or professional) nature • use this opportunity together to discuss ways in which we can create an inclusive environment in this course and across the Cornell community

Tentative Course Schedule:

Week 1: Intro and Importing Data • Assigning variables • Basic data types • Data frames, data types Week 2: Working with data • Subsetting data • Using R functions • Using basic plot functions Week 3: Working with data • Writing your own functions Week 4: Working with data • Loops • Logical operators Week 5: Plotting in R • Plotting with ggplot2 Week 6: Trouble shooting and presenting plots • Parentheses, punctuation • Dates and times • Where to look for help

Additional Resources

https://www.r-bloggers.com/ http://www.r-tutor.com/r-introduction https://stackoverflow.com/questions/tagged/r