Get and Set Working Directory in R
In this article, we are going to see how to get and set a working directory in R Programming Language.
How to Get Working directory:
getwd(): The getwd() method is used to gather information about the current working pathname or default working directory. This function has no arguments. It returns an absolute pathname. It returns NULL in case there is not any working directory.
How to set up a working directory:
setwd(): This method is used to set the specified pathname as the current working space directory of the R console.
Where, dir is specify a working directory.
The setwd() function allows us to move a hierarchy level up in the folder domain using the “..” argument in this method.
 "Current working directory"  "/Users/mallikagupta/Desktop"  "Modified working directory"  "/Users/mallikagupta"
The subfolders can be easily accessed once the root directory has been set or is available by further specifying the character name of the sub-directory as a character string in the function arguments.
 "Current working directory"  "/Users/mallikagupta/Desktop/GFG"