1.4 {here} package

Open the slides in a new tab here.

Exercises

  1. Install the {here} package:

    install.packages("here")
  2. In the console, run:

    here::here() to print your project directory
    getwd() to print your working directory

    What do you notice?

  3. In the console, run:

    setwd("data") to set your working directory

    Then run the same lines as above. What do you notice?

  4. Download the .R script here and use your file browser to put it in the R folder in your project. Open the script and run through the code line-by-line. Compare it with the code from the last section.

Resources