1  Install Party

This chapter was written by Prof. McDonald using macOS.

Let’s get this party started.

1.1 Mac vs PC

We’re a big fan of using keyboard commands to do operations in any program, but Prof. McDonald references this from a Mac perspective and Prof. Lukito references this from a PC perspective. So if we say use Cmd+S or Command+S to save, that translates to Cntl+S or Control+S on a PC. You can typically just switch Cmd (for Mac) and Cntl (for PC), but occasionally there are other differences. You can usually check menu items in RStudio to figure out the command your your computer.

We will note the author and operating system at the top chapters so you have a frame of reference.

1.2 RStudio vs posit.cloud

This book is written assuming the use of the RStudio IDE application, which is free and available for Macs, PC’s and Linux. In cases where computers have trouble running R and Rstudio, it is possible to to use the online posit.cloud version of RStudio. If you are using posit.cloud for the Reporting with Data class, you’ll likely hit a pay tier at some point. The Cloud Plus plan at $5/mo is typically sufficient. You may find some specific posit.cloud instruction in this book, but we don’t outline every difference.

We will install R and RStudio. It might take some time depending on your Internet connection. If you are doing this on your own you might follow this tutorial. But below you’ll find the basic steps.

1.3 Installing R

Our first task is to install the R programming language onto your computer.

  1. Go to the https://cloud.r-project.org/.
  2. Click on the link for your operating system.
  3. The following steps will differ slightly based on your operating system.
    • For Macs, you’ll need to know if you have an Apple or Intel chip. Go under the Apple menu to About this Mac and you should be able to see if you have Apple or Intel. You’ll choose which download based on that.
    • For Windows, you want the “base” package. You’ll need to decide whether you want the 32- or 64-bit version. (Unless you’ve got a pretty old system, chances are you’ll want 64-bit.)

This should be pretty self explanatory: once you download the installation file, you should be able to run it on your respective computers to install R.

You’ll never “launch” R as a program in a traditional sense, but you need it on your computers (it’s mostly so that the computer can recognize R as a “language”). In all situations (in this class, and beyond), we’ll use RStudio, which is next.

1.4 Install Quarto

Go to the Quarto Getting Started page and there should be a big blue button that links to the software for your computer. Follow the prompts to install.

1.5 Installing RStudio

RStudio is an “integrated development environment” – or IDE – for programming in R. Basically, it’s the program you will use when doing work for this class.

  1. Go to https://posit.co/downloads/.
  2. You’ve already done step 1 to install R. Find step 2.
  3. There should be a big blue button to download for your computer.
  4. Install it. This should be like installing any other program on your computer.

1.5.1 Getting “Git” errors on Macs

If later during package installation you get errors that mention “git” or “xcode-select” then say yes! and do it. It might take some time. If it doesn’t finish, then try again the next time it comes up.

1.6 Class project folder

To keep things consistent and help with troubleshooting, we recommend that you save your work in the same location all the time.

  • On both Mac and Windows, every user has a “Documents” folder. Open that folder. (If you don’t know where it is, ask us to help you find it.)
  • Create a new folder called “rwd”. Use all lowercase letters.

When we create new “Projects”, I want you to always save them in the Documents/rwd folder. This just keeps us all on the same page.