The RTutorialUSC R package is a tutorial/presentation that covers the basics for reading, manipulating, visualizing, and analyzing data in R. Here we take a practical approach by going through the basic flow of analyzing data in R and teach core concepts of R along the way. The tutorial utilizes the R package learnr to build code examples directly into an ioslides presentation and can be used as a teaching aid or for self-guided learning. All R packages required to run the code in this tutorial will be installed when you install this R package
The following instructions will setup your computer to run R, RStudio, and enable you to install R packages from Github.
Please follow the instructions below for your OS:
Windows
- Download and install the latest version of R (3.6.1)
Here
- Note: This tutorial requires R version > 3.5.0, if you have an R version older than this, please update.
- Download and install RStudio
Here
- Note: For easiest installation select from “Installers for Supported Platforms”
- Download and install Rtools for Windows Here
Mac
- Download and install the latest version of R (3.6.1)
Here
- Note: This tutorial requires R version > 3.5.0, if you have an R version older than this, please update.
- Download and install RStudio
Here
- Note: For easiest installation select from “Installers for Supported Platforms”
- Download and install gfortran for Mac Here
- Download and install clang for Mac Here
We will go over this in-person, but if you are already comfortable with R and Rstudio, feel free to get a head start.
- Open Rstudio
- Install the R package devtools by running the following command in the console:
install.packages("devtools")
- Install RTutorialUSC R package with devtools by running the following command in the console:
devtools::install_github("gmweaver/RTutorialUSC")
- Load the RTutorialUSC package by running the following command in the console:
library(RTutorialUSC)
- Start the tutorial by running the following command in the console:
learnr::run_tutorial("Introduction to R", "RTutorialUSC")
If a new browser window/tab opens with a presentation titled “Introduction to R”, 🎉 congrats 🎉, you are ready to start!