Tasks for Week 01
Task 1: Install R and RStudio
We will be working with the most recent stable versions of R and RStudio, as well as with a number of additional packages. You will need to install R, RStudio, and the necessary packages on your own computer.
Install R on your computer
Begin by installing R (http://cloud.r-project.org). Choose the version appropriate for your computing platform:
If you use macOS with an Apple Silicon processor (i.e. an M1, M2, or M3 processor), then install R for macOS’s Apple Silicon build. This version does not work on older, Intel-based Macs.
If you use macOS with an Intel processor, then install R for macOS’s Intel build.
If you use Microsoft Windows, then install R for Windows
If you use Linux, choose a distribution and install it.
Install RStudio on your computer
If you use macOS (whether Apple Silicon or Intel), install this version of RStudio
If you use Windows, install this version of RStudio
If you use Linux, choose your distribution from the download page
Installing some additional packages
- Once R and RStudio are installed, launch RStudio. Either carefully type in or (better) copy and paste the following lines of code at R’s command prompt. The prompt is located in the RStudio window named “Console”. After you paste the lines in, hit return. In the code below, the
<-
arrow is made up of two keystrokes, first<
and then the short dash or minus symbol,-
.
<- c("tidyverse", "babynames", "broom", "drat", "gapminder",
my_packages "here", "janitor", "naniar", "palmerpenguins", "remotes",
"skimr", "slider", "socviz", "usethis", "visdat","reprex", "tinytex")
install.packages(my_packages, repos = "http://cran.rstudio.com")
# Be patient!
<- paste0("kjhealy/", c("covdata", "congress", "nycdogs", "ukelection2019", "uscenpops"))
data_packages ::install_github(data_packages) remotes
Installing these packages may take a little time.
Task 2: Get set up on GitHub
GitHub is a software development platform and service that is widely used by R Developers. You can read some background on it from an R user’s point of view here.
If you do not have one already, create a GitHub account and obtain a GitHub Personal Access Token. After you have installed R and RStudio, read and carefully follow the instructions here:
- Register a GitHub Account
- Install Git and a Git Client
- Get a Personal Access Token
- Connect to GitHub