getwd()

Get or Set Working Directory

getwd returns an absolute filepath representing the current working directory of the R process; setwd(dir) is used to set the working directory to dir.

Keywords
utilities
Usage
getwd()
setwd(dir)

You can see further readings in the following link.

Instruction

Copy and Run the sample code in your Rstudio to see how getwd() and setwd() function works.

DO NOT CLICK RUN

# get working directory. print(getwd()) # set working directory. setwd('Data')

Previous: 4-2 | list.files()

Next: 4-4 | read.csv()

Back to Main