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)
| Parameter | Description |
|---|---|
dir |
A character string: tilde expansion will be done. |
# NOT RUN {
(WD <- getwd())
if (!is.null(WD)) setwd(WD)
# }