| Week | Topic | Homework | In-Class WPA |
|---|---|---|---|
| 1 – Feb 24 | Introduction | None | WPA #0 (Answers) |
| 2 – March 2 | R basics, scalers and vectors | Chapters 1 - 4 | WPA #1 (Answers) |
| 3 – March 9 | Vectors | Chapter 5 | WPA #2 (Answers) |
| 4 – March 16 | Matrices and Dataframes | Chapter 6 | WPA #3 (Answers) |
| Easter Break | - | - | - |
| 5 – March 30 | Importing and saving data, Dataframe manipulation | Chapter 7, Chapter 8 | WPA #4 (Answers) |
| 6 – April 6 | Plotting | Chapter 9 | WPA #5 (Answers) |
| 7 – April 13 | 1 and 2 sample Hypothesis tests | Chapter 10 | WPA #6 (Answers) |
| 8 – April 20 | ANOVA and Factorial designs | Chapter 12 | WPA #7 (Answers) |
| 9 – April 27 | Linear Regression | Chapter 13 | WPA #8 (Answers) |
| 10 – May 4 | Custom Functions | Chapter 14 | WPA #9 (Answers) |
| 11 – May 11 | Loops | Chapter 15 | - |
| 12 – May 18 | Writing APA papers with R and LaTeX | - | WPA #10 |
| 13 – May 25 | Final project work | - | - |
| 14 – June 1 | Final project work | - | - |
| June 15 | Final Paper Due!!! | Paper Guidelines | - |
| Link | Description |
|---|---|
| WPA Submission Page | Submit your assignments here |
| Chapter Exercise Solutions | Solutions to the end of chapter Test Your R Might! exercises |
| R Reference Card, Markdown Reference Card | The very helpful R Reference Card and Markdown Reference Card |
| Answers to ALL your R questions | Do you have an R question? This incredible website has answers to almost any R question you can imagine. |
| R Markdown Overview | A Markdown document showing the basics of using Markdown |
| Example R Markdown Document: Chicken Weights | A complete, well-formatted Markdown document |
Email: nathaniel.phillips@unibas.ch
Office Hours: By appointment (or just stop by my office at Missionsstrasse 62A)
Mobile Phone: None of your business
R is the most popular statistical language for both academic researchers and data analysts working in industry. The reason why is simple - R is free, easy to use and incredibly powerful. With R you can generate and manipulate data, conduct analyses, create plots and even write documents.
The goal of this course is to introduce you to R so you can apply it to your current and future research. In this course, you will learn how to use R to conduct all steps of your data analysis, from loading data to performing analyses, to producing reports.
This course is for anyone who wants to learn R. I don’t care if you’re 10 or 100 or what your background is in programming, math, or pirate history. If you want to learn R, this course is for you. That said, the course is designed around the needs of a psychology student in a Bachelor’s, Masters, or PhD program.
This is a ‘flipped’ course. This means that you will be learning the basic material at home - mainly by reading book chapters and watching occasional YouTube videos. During class, you will complete exercises (called “Weekly Programming Assignments” or WPAs for short) with a partner while I provide help.
There is no physical text book for this course. Instead, you will be reading chapters from an e-book I am translating called YaRrr! The Pirate’s Guide to R. Links to chapters to the book will be posted on the top of this page as the course progresses.
If you are interested in additional, non-piratey materials, there are numerous books and websites that can help you discover new ways of utilizing R. Two books I can recommend are Discovering Statistics Using R by Field and Miles and The R Book by Crawly. If you don’t like books, you can also find free R courses at www.coursera.com, www.datacamp.com, and other similar websites. As is the case with most problems, a quick Google search will likely provide good solutions.
During each class you will work on a series of programming tasks called a Weekly Programming Assignment (WPA). Like the questions on Who Wants to be a Millionnaire?, the questions on WPAs will start easy to help remind you of the reading, but end hard in order to push your knowledge of the material. However, I do not expect you to finish the entire WPA by the end of class. Work hard, ask questions, and complete as many of the problems as you can. At the end of each class you will turn in whatever you completed for a pass/fail grade. The only way to fail your assignment is to not turn it in. You are not expected to continue working on WPAs outside of class.
I encourage you to work with a partner (or two) on WPAs. However, it is very important that each student’s work is his/her own. Do not turn in any assignments that you did not contribute to or do not fully understand.
Once we learn Markdown, all WPAs must be written in R Markdown and ‘knitted’ to an HTML file. You should publish your document to RPubs and then submit the resulting .html link on the WPA submission page (see link above).
Complete answers to WPAs will be posted shortly after each class. I strongly encourage you to look over the answers when they are posted.
We will try to cover as many of the following topics as possible in this course
If you want to learn how to program, you have to do two things: work regularly, and get help. For these reasons, class attendence is required. Every unexcused absense will hurt your grade. If you have a valid excuse for missing a class (e.g.; job interview, family emergency), if you give me sufficient notice (usually 24 hours), you will not receive a grade penalty. However, I expect you to make up the WPA in a reasonable amount of time.
It should be noisy during class. A quiet class is typically a bored class that isn’t learning anything. A noisy class is a class that’s struggling, asking questions, and actually learning. If I find that the class is not noisy enough, I reserve the right to play Justin Bieber until the class gets noisy again. This is not an empty threat.
While I expect the class to be noisy, mobile phones and non course related web-surfing are absolutely forbidden during the class period! If you’re not here to have fun and learn R with the rest of the class, don’t bother coming.
At the end of the course you will complete a final analysis project. In this project, you will produce a report containing several key analyses from a dataset of your choosing. If you have a specific dataset you would like to analyze (such as from your thesis), you are welcome to use it. If not, I will assign one to you. I will give you more details about the project later in the course.