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.
getwd()
setwd(dir)
You can see further readings in the following link.
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')