41 Installations
You’re going to do things most of you aren’t used to doing with your computer in this class. In order to do that, you need to clean up your computer. I’ve seen what your computer looks like. It’s disgusting.
41.0.1 Part 1: Update and patch your operating system
On a Mac:
Open System Preferences.
Depending on how old your Mac OS is, you might see this:
Or you might see this:
Check and see if you have the latest version of the Mac OS installed. If your computer says “Your Mac is up to date”, then you’re good to go, regardless of what comes next.
If you aren’t on Sonoma and you can update to it, you should do it. This will take some time – hours, so don’t do it when you need your laptop – but it’s important for you and your computer to stay up to date on operating systems.
When you’re done, make sure you click the Automatically keep my Mac up to date box and install those updates regularly. Don’t ignore them. Don’t snooze them. Install them.
With an up-to-date operating system, now install the command line tools. To do this, click on the magnifying glass in the top right of the screen and type terminal. Hit enter – the first entry is the terminal app.
In the terminal app, type
xcode-select --install
and hit enter. Let it run.
On Windows:
- Type Updates into the Cortana search then click Check for updates
- After the search for updates completes, apply any that you have. Depending on if you’d done this recently or if you have automatic updates set, this might take a long time or go very quickly.
- When you’re done, make sure you set up automatic updates for your Windows machine and install those updates regularly. Don’t ignore them. Don’t snooze them. Install them.
41.0.2 Part 2: Install R and R Studio
Go here. Go to Step 1 and click Download and Install R
If you’re on a Mac, click on Download R for MacOS. If you have a newer Mac with an M1/M2/M3 chip, you want the arm64 version. If you’re on an older Mac with an Intel chip, you want the X86_64 version.
If you’re on Windows, install the base package AND install Rtools. When either downloads, run the executable and accept the defaults and license agreement.
Go back to here. Go to Step 2 and click R Studio Desktop for your version.
Mac users:
Windows users:
You can find it by typing RStudio into the Cortana search.
41.0.3 Part 3: Installing R libraries
- Open R Studio. It should show the Console view by default. We’ll talk a lot more about the console later.
- Copy and paste this into the console and hit enter:
install.packages(c("tidyverse", "rmarkdown", "lubridate", "janitor", "patchwork", "learnr", "wehoop", "worldfootballR", "remotes", "devtools", "waffle", "ggrepel", "ggbeeswarm", "ggbump", "ggalt", "ggtext", "rvest", "Hmisc", "cluster"))
41.0.4 Part 4: Install Slack
- Install Slack on your computer and your phone (you can find Slack in whatever app store you use). The reason I want it on both is because you are going to ask me for help with code via Slack. Do not use screenshots unless specifically asked. I want you to copy and paste your code. You can’t do that on a phone. So you need the desktop version. But I can usually solve your problem within a few minutes if you respond right away, and I know that you have your phone on you and are checking it. So the desktop version is for work, the phone version is for notifications.
- Email me the address you want connected to Slack. Use one you’ll actually check.
- When you get the Slack invitation email, log in to the class slack via the apps, not the website.
- Add the #r channel for general help I’ll send to everyone in the channel and, if you want, the #jobstuff channel for news about jobs I come across.