Before we meet for our first class there are few things you should try at home to get started.

- Download and install R on your computer. This is the R website https://www.r-project.org
- Download and install R-studio. You must download and install R first before installing R-studio. The R-studio website is https://www.rstudio.com
- Create a free github account. The github website is https://github.com
- Download and install github desktop https://desktop.github.com
- At this point you should have downloaded R and R-studio to your own computer. This will allow you to run R and R-studio locally. It is also possible to run R-studio in the cloud through your web-browser. To do this you need to create an account with R-studio cloud. Create an account here https://rstudio.cloud.
**Note:**In class we will be using a computer lab wit R-studio installed on the computers. You will have the option of using the lab computer, or bringing your own laptop, and/or using R-studio through the cloud.

Don’t worry if you ran into issues with these first steps, we will address them in class on Monday.

If you have R-studio working is there anything else you can do before we meet for the first time on Monday? Yes.

You can follow the video tutorial on creating an R markdown website with github pages on the video page. And, you can get started with some of the readings, and you can begin messing around in R. Here are some things to read:

- Programming for Psychologists, Chapter 1
- Programming for Psychologists, Chapter 2
- Navarros’ Section 1: Core Toolkit

We will be spending the first few weeks of the course working on solving different kinds of coding problems in R. These problems will help you learn the ins and outs of coding in R. You can get a head start by trying to solve the problems in this list of programming challenges.

- Getting set-up with R, R-studio, using R-studio cloud, and Github.
- Follow a tutorial to create a free Github account, and then create a webpage using R Markdown and host it for free on Github. Students will use their personal website throughout the course as a mechanism for submitting assignments and to document their progress learning R.
- Introduction to basic programming concepts in R (variables, loops, logic, functions)

Due date: M Feb 4th

- Create a website using R Markdown and host it on Github pages, then submit the link to your website on Blackboard for Assignment 1. We will create the website in class using this template https://github.com/CrumpLab/LabJournalWebsite
- Edit and customize your website to make it your own. Edit the journal page and rename it to “R Basics”.
- Use the new “R Basics” .rmd file to begin working through the list of programming challenges. For each problem create a new header, briefly describe the problem, then create a code-block and write code to solve the problem.
- Throughout this course you will likely have many questions about how to solve different kinds of problems in R. We will use Github’s issues tracking feature as a way for everyone to post questions and solutions. Go to the github repository for this course https://github.com/CrumpLab/psyc7709. You will see an issue tab, with a “say hello” issue posted. Please add a comment to this issue so that I know that you can post issues. Then, if you have a question about R, please create a new issue. The entire class should be monitoring the posted issues, and anyone who knows an answer can respond with a comment.

- Continue working on solving programming challenges
- More discussion on variable types in R, and using loops and logic to create simple algorithms.
- Overview of useful intrinsic functions in R

Due date: M Feb 11th

- Continue adding to your “R Basics” page to document progress in solving programming challenges. Upload link to website showing progress. Students to should attempt all of the simple programming challenges, and begin working on the harder problems. As you complete each problem it is a good idea to try and be creative by solving the problem in different ways. So, it is ok to have multiple solutions for each problem.
**New**: The new assignment for this week is to learn about existing functions in R, these are called R intrinsics. I have created an assignment worksheet with instructions, https://crumplab.github.io/psyc7709/Presentations/RInstrinsics.html. The assignment contains a list of existing functions. Your task is to create a page on your website. Then, copy the list of functions from the assignment. For each function, you will write a brief description (only needs to be a sentence) of what it does, and then you will write a code chunk demonstrating that you can use the function. This will help you become familiar with existing functions that you can use. If you get stuck and are unable to figure out what a function does, post your question on the github issues tab for this course https://github.com/CrumpLab/psyc7709/issues.

tips: I added a video showing how to add a new page to your R markdown website

- Continue working on solving programming challenges
- Writing functions in R

Due date: M Feb 25th

Last week to document progress in solving programming challenges. Upload link to website showing progress. Students should attempt and solve as many of the harder problems as they can.

Create and share an R package containing custom functions on github. Follow the instructions in the R package assignment that we will discuss in class. Upload the link to your new github repository containing your R package to blackboard.

tips: I added a video showing how to create a new R package and publish it to github.com

**NEW**this an addition to your assignment not discussed in class. The assignment instructions are in the github assignment document. This assignment gives you more practice using github features. You will be forking a repo, adding to the code, then making a pull-request to have your new changes be incorporated into the master repository. Also, you will be able to see other students solutions to two of the harder programming problems.

tips: I added a video showing how to fork and make a pull request

- Introduction to the grammar of graphics ggplot2 package for data-visualization

Your assignment is to practice making graphs in ggplot2. Click this link to see the assignment instructions. You will be making a new R markdown page documenting your code for making graphs in the assignment. Load this page onto your website, then submit the link to the page on blackboard.

Due date: M Mar 4th

We had a snow day for this class. Here is a short video tutorial to help you get started and complete the assignment for this week. We will go over everything here next class as well.

- Loading Data into R
- Data formatting (dataframes and data.tables)
- Introduction to the dplyr package for filtering, selecting, augmenting, and summarizing data sets (and more).

- Class notes on Data-wrangling
- Example R Markdown analysis report
- Your Rmarkdown Assignment This links to the .rmd file, that you can use as a template to complete the assignment. Using this template file, create a new page on your website, and submit the link
- Answer sheet for assignment You can use this to check your work. If you don’t get the same numbers, then one of us did something wrong.

Due date: M Mar 18th

- t-tests, anovas, and linear regresssion, and more in R
- Using R to simulate null-hypotheses
- Overview and discussion of midterm project (three parts due over the next three weeks)

- Statistics Assignment, due M Mar 25th
- This assignment asks you to simulate the null hypothesis in various ways using R.

- The midterm project begins this week (due aprill 8th)

- Introduction to creating reproducible APA manuscripts using the papaja package. Students learn how to use the template for writing an APA report in R Markdown, which allows them to embed their R-scripts for data-analysis into the manuscript, allowing others to reproduce their analysis.
- Midterm project continued

- part 1: Reproducible Report
- part 2: Convert to APA-style report using papaja

- Simulating data from scratch, and using monte-carlo methods for power analysis and sample-size planning.

- Introduction to R Shiny for building interactive web-applications

- Make a R shiny app (it can do whatever you want to make).
- Host the app as a folder on Github, or upload to shinyapps.io cloud server (need to create free account).
- Submit link on Blackboard

Due date: M Apr 15th

- Principles of scripting for efficient memory management, including using profiles packages for determining which parts of a script can be further optimized. Discussion of vectorization in R.

No Assignment

- Open science and transparency.

Presentation due: M May 15th Paper due date: M May 20th

- Using R Markdown and the xaringan package to compile R Markdown documents into slide presentations for the web.

Presentation due: M May 15th Paper due date: M May 20th

- Introduction to using the R Markdown format to compile documents into web-books, .pdf’s, and epubs using the bookdown package.

Presentation due: M May 15th Paper due date: M May 20th

- Final Project individual presentations