0

Basic question sorry and probably already answered but having trouble searching for a solution.

I want to work on some data file: C:/Users/userg/desktop/R/harv/trial1/short/data/file_name.csv

  1. So in global settings I set my default working directory to: C:/Users/userg/desktop/R

  2. when I start a session I want to focus on this project by writing: setwd("harv/trial1/short")

  3. and when I load my data I want to write: df<- read_csv("data/file_name.csv")

I normally just write: setwd("C:/Users/userg/desktop/R/harv/trial1/short") at the opening of the session and then use 3.

Is there a way I can do what I want or do I have to just keep writing out the full path every time?

Cheers

Gilrob
  • 93
  • 7

0 Answers0