Chapter 3 Installation

To participate in PLSC 31101, you will need access to the software described below.

3.1 R

R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis.

To download R, go to CRAN (the Comprehensive R Archive Network). Please install R version 4.0.2 (2020-06-22) – “Taking Off Again”.

If you use a Mac, this will require at least 10.11 (El Capitan) as your OS. If you use a PC, anything Windows 7 or later will be sufficient.

3.2 RStudio

To interact with R, we use RStudio. Please install the latest desktop version of RStudio IDE. We will not support RStudio Cloud.

3.3 R Packages

You will also need to install some R packages. An R package is a collection of functions, data, and documentation that extends the capabilities of base R. Using packages is key to the successful use of R.

Many of the packages that you will learn in this class are part of the so-called tidyverse. The packages in the tidyverse share a common philosophy of data and R programming and are designed to work together naturally.

To install packages, open RStudio. Go to Tools > Install Packages. Enter the following: tidyverse, knitr, gapminder, rtweet, kableExtra, devtools, tm, wordcloud, matrixStats, SnowballC, tidytext, textdata, stm, readtext

If you have problems installing packages, make sure that you are connected to the internet and that https://cloud.r-project.org/ is not blocked by your firewall or proxy. If RStudio returns an error message, go to “Preferences” and check the “Packages” section. Under “CRAN Mirror,” if no mirror is selected, choose “Global (CDN) - RStudio”.

3.4 LaTeX

In order to knit R Markdown files to PDF files, you need to install some version of LaTeX. For students who have not installed LaTeX before, we recommend that you install TinyTeX (https://yihui.name/tinytex/).

Open RStudio and type these lines into the command-line console:

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

3.5 Git

Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com.

Download Git here: https://git-scm.com/downloads.

After installing Git, there will not be anything in your /Applications folder, as Git is a command line program.

3.6 Google Chrome

You will need to have a modern web browser installed to perform some of the tasks in this class. The recommended browser for this class is Google Chrome.

3.7 Selector Gadget

As part of the webscraping process, you will need to examine HTML elements in your data. In this class we will be using Selector Gadget for this purpose.

If using Google Chrome, you can simply install the Selector Gadget Chrome extension. If for any reason you cannot use Chrome extensions (including on Chrome itself), you can instead install Selector Gadget by following the instructions on the Selector Gadget website.

3.8 Other Helpful Tools

While not required, I recommend you install Sublime Text, which is a free, advanced text editor.

3.9 Troubleshooting

If you have trouble with installation, please come to the Installfest on Wednesday, September 30 from 9:30 am to 11:30 am, on Zoom.

Software Carpentry maintains a list of common issues that occur during installation that may be useful for our class here: Configuration Problems and Solutions wiki page.

If you still have difficulties installing, please post a question on Piazza with details on what you are trying to install, what actions you took, any error messages, etc.