DATA 606 - Statistics & Probability - Spring 2021


R and RStudio


We will make use of R, an open source statistics program and language. Be sure to install R and RStudio on your own computers within the first few days of the class.

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



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:


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',

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