R/RStudio

RStudio
RStudio

The lab sessions themselves will take place in rooms with computers in them for the student to use, though there is a (reasonable, implicit) assumption that the student has a personal computer. Tablets are not advised for these purposes as it is difficult to install the required third-party software needed for this course, which would be a major issue no matter the third-party software the student used for statistical analysis. Tablets will also typically lack the kind of memory and processing power for computational uses like this.

Lab sessions and problem sets (more in the next section) will all be done in the R programming language. Students should download this free software programming language at cran.r-project.org and install it on their personal computer. Binaries are available for Windows and Mac (even Linux, if that is the weapon of choice for the student). The instructor will be teaching around R version 4.1.2. It’s fine if you have a more current version that you install. If you have an older version than this, you should really upgrade to a more current version (just in case).

The lab instructor published a beginner’s guide to using R in 2014 when he first started to teach courses that forced students to use the R programming language. He has since streamlined the R requirements for this class, making that guide somewhat dated. You will need to install the following packages, which are illustrated here with the R commands to install them.

install.packages("tidyverse")      # for most things workflow
# ^ This is a huge installation. It should take a while.
install.packages("stevedata")      # for toy data sets to use in-class
install.packages("stevemisc")      # for some helper functions
install.packages("stevethemes")    # for theme elements and example data
install.packages("modelsummary")   # For presenting data/models
install.packages("stevetemplates") # OPTIONAL: for preparing reports

The aforementioned R packages are not exhaustive of all packages a student may use this semester, and the lab instructor reserves the right to ask students to install additional packages along the way (though these requests will ideally be rare). He will make this clear in each lab session and problem set. {stevetemplates} is an optional package, though students should find it useful for preparing presentation-quality documents that include R code.

The {tidyverse} package will easily be the most time-consuming package to install, and the one most likely to give some students a potential problem during the course of its installation. In the strictest sense of the word “mandatory”, this package is not “mandatory”. It is possible to achieve the same results of this package by using either other packages in R or some functions that are default in R. However, not using this singular package—itself a wrapper for package for dozens of other R packages—would require the student to either download and install other R packages or require the student to learn code that is much less legible and intuitive than {tidyverse} code. Downloading and installing {tidyverse} is ultimately worth the effort, especially for beginners.

Based on experience, students may expect the following issues if the installation of this package results in an installation error (“non-zero exit status”), contingent on their operating system.

Past experiences with teaching students how to install R, RStudio, and these R packages have led to an appreciation of assorted difficulties and idiosyncrasies that are 1) solvable but 2) often more trouble than it’s worth. If you have an anti-virus program that’s blocking third-party software downloads, you should know you have that. It’s really not possible for the instructor to know that because the instructor would have to respect your privacy and your personal property. If you are a Mac user, you should really take inventory of what exactly your Mac is (i.e. you should know what version your operating system is and what your chipset is). Click the Applie icon at the top left of your screen to find out more. There is only so much the instructor can do on your behalf because they are not also paid as IT professionals.

If, for some reason, you are unable to install R, RStudio, or a package that I’ll be using, sign up for a free account on Posit Cloud. Posit Cloud will give you 25 project hours a month, which should be more than enough when combined with the resources available in the computer lab.1

  1. WebR can help you with a few things but it’s not as capable. You can experiment with it, though.