Welcome to the online materials for the course ‘R for Publication’. The goal of this course is to give you the skills to do the statistics that are in current published papers, and make pretty figures to show off your results. While we will go over the mathematical concepts behind the statistics, this is NOT meant to be a classical statistics class. We will focus more on making the connection between the mathematical equation and the R code, and what types of variables fit into each slot of the equation.
Much of the R code will come from the Hadleyverse, including the well-known ggplot2, the less-well known dplyr, and the even less-well known (but still very useful!) purrr. If you already have experience with R, but are less familiar with these packages, this course will help you improve your R pipeline to be more readable and efficient.
In addition to statistics and figure making, this course will get you acquainted with other aspects of R and RStudio to allow for more productive data analysis and management, including R Projects, Git, and Bitbucket.
Pre-course To Do
To begin you will need to have a few things pre-installed or set up:
- Install R. If you already have R installed, be sure it is the newest version.
- Install RStudio.
- Make sure tex (e.g. LaTeX) is installed.
- Set up Git on your local computer.
- Make a Bitbucket account.
After that you’re ready to go!
The course is set up to follow a certain order with each lesson building on the previous one. However, you can also use the links below to jump to a specific topic.
- Lesson 0: Introduction and Set-up
- Lesson 1: R Basics
- Lesson 2: Linear Regression
- Lesson 3: Logistic Regression
- Lesson 4: Multiple Regression
- Lesson 5: Analysis of Variance (ANOVA)
- Lesson 6, Part 1: Linear Mixed Effects Models (LMEM)
- Lesson 6, Part 2: Linear Mixed Effects Models (LMEM)