This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/getwd.html
getwd {base}R Documentation

Get or Set Working Directory

Description

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

Usage

getwd()
setwd(dir)

Arguments

dir

A character string.

Examples

(WD <- getwd())
if (!is.null(WD)) setwd(WD)

[Package base version 1.5.0 ]