EPSY 630 Statistics II - Spring 2021

Software

R and RStudio

We will make use of R, an open source statistics program and language. For this course you have two options: 1. Use RStudio on the web or 2. Install it on your own computer.

RStudio on the Web

Go to r.bryer.org to login to RStudio on the web. You should have received your username and password during the first class. If you have any issues email me.

Install R and RStudio on your computer

Although I recommend using the RStudio web version for the first part of the class, I do recommend eventually trying to install R and RStudio on your own computers as I will be able to help you troubleshoot any issues. Links to download the software are provided below:

If using Windows, you also need to download RTools and ActivePerl.

LaTeX

LaTeX is a typesetting language for preparing documents. Documents are written in plain text files. Formatting the document is done using specific markup. If you have used HTML, the framework is similar however instead of using <TAG></TAG> syntax, LaTeX uses \TAG{} format. We will primarily use Markdown, and its extension R Markdown for preparing documents in this class. However, when preparing PDF documents, the Markdown will first be converted to LaTeX before creating the PDF file. As such, a LaTeX converter is necessary. There are LaTeX installers for Windows (MiKTeX) and Mac (BasicTeX). Alternatively, the tinytex R package provides an easier way of installing LaTeX directly from within R:


install.packages('tinytex')
tinytex::install_tinytex()

Source Control

All course materials will be made available on Github which provides an implementation of the git open source version control system. RStudio supports git directly, but I recommend downloading Sourcetree. This is a free desktop client that provides an easier interface for working with Github. You will also need to create an account on Github.

For more information, Jenny Bryan’s Happy Git and Github for the useR is a free online book covering the important features of source control for R users.

R Packages

Once everything is installed, execute the following command in RStudio to install the packages we will use for this class (you can copy-and-paste):


install.packages(c('openintro','OIdata','devtools','tidyverse', 'ggplot2',
                   'psych','reshape2','knitr','markdown','shiny','R.rsp',
                   'fivethirtyeight'))
devtools::install_github("jbryer/DATA606")

The DATA606 R Package

Many of the course resouces are available in the DATA606 R package. Here are some command to get started:


library('DATA606')          # Load the package
vignette(package='DATA606') # Lists vignettes in the DATA606 package
vignette('os4')             # Loads a PDF of the OpenIntro Statistics book
data(package='DATA606')     # Lists data available in the package
getLabs()                   # Returns a list of the available labs
viewLab('Lab1')             # Opens Lab1 in the default web browser
startLab('Lab1')            # Starts Lab1 (copies to getwd()), opens the Rmd file
shiny_demo()                # Lists available Shiny apps