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:

Install RStudio on your computer

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, -.
my_packages <- c("tidyverse", "babynames", "broom", "drat", "gapminder",  
                  "here", "janitor", "naniar", "palmerpenguins", "remotes",
                  "skimr", "slider", "socviz", "usethis", "visdat","reprex", "tinytex")

install.packages(my_packages, repos = "http://cran.rstudio.com")

# Be patient!
data_packages <- paste0("kjhealy/", c("covdata", "congress", "nycdogs", "ukelection2019", "uscenpops"))
remotes::install_github(data_packages)

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: