Get & Set Working Directory in R

R

A quick snippet showing how to get and set the current working directory in R using either the console or script.

#Get the current working directory
getwd()

#Change the current working directory
setwd("~/Documents/Data Science Projects/stock-forecasting")
Did you find this snippet useful?

Sign up for free to to add this to your code library