install.packages(c("tidyverse"))
Tech Setup
Follow these instructions to set up the software that we’ll be using throughout the semester. Even if you’ve already downloaded both R and RStudio, you’ll want to re-download to make sure that you have the most current versions.
Required: Change the default file download location for your internet browser.
- Generally by default, internet browsers automatically save all files to the
Downloads
folder on your computer. This does not encourage good file organization practices. You need to change this option so that your browser asks you where to save each file before downloading it. - This page has information on how to do this for the most common browsers.
Required: Re-install R and RStudio.
- FIRST: Download R here.
- In the top section, tou will see three links “Download R for …”
- Choose the link that corresponds to your computer.
- As of January 16, 2024, the latest version of R is 4.3.2 (“Eye Holes”).
- SECOND: Download RStudio here.
- Click the button under step 2 to install the version of RStudio recommended for your computer.
- As of January 16, 2024, the latest version of RStudio is 2023.12.0-369.
- THIRD: Check that when you go to File > New Project > New Directory, you see “Quarto Website” as an option.
Suggested: Watch this video describing key configuration options for RStudio.
Required: Install required packages.
- An R package is an extra bit of functionality that will help us in our data analysis efforts in a variety of ways.
- Open RStudio and click inside the Console pane (by default, the bottom left pane). Copy and paste the following command into the Console. You should see the text below appear to the right of the
>
, which is called the R prompt. After you paste, hit Enter.
- You will see a lot of text from status messages appearing in the Console as the packages are being installed. Wait until you see the
>
again. - Enter the command
library(tidyverse)
and hit Enter.
If you see an error message, then there was a problem installing the package. Post the full error message in the#questions
channel in our Slack workspace and - Quit RStudio. You’re done setting up!
Optional: For a refresher on RStudio features, watch this video. It also shows you how to customize the layout and color scheme of RStudio.
Required: Set essential RStudio options.
Go to Edit > Preferences > General
Navigate to the “Workspace” section.
- Restore
.RData
into workspace at startup: Leave this unchecked - Save workspace to
.RData
on exit: Select “Never”
Without doing this RStudio will save all of the objects in your Environment. In practice, this leads to all of the objects, datasets, etc that you have ever worked with at Macalester being loaded in when you start RStudio.
- This can make startup slow.
- It clutters the Environment. (e.g., You’re working on something and referring to
diamonds
not knowing that adiamonds
that was used in class last year is already in the Environment.)