\HeaderA{getwd}{Get or Set Working Directory}{getwd}
\aliasA{setwd}{getwd}{setwd}
\keyword{utilities}{getwd}
\begin{Description}\relax
\code{getwd} returns an absolute filename representing the current
working directory of the \R{} process; \code{setwd(dir)} is used to set
the working directory to \code{dir}.
\end{Description}
\begin{Usage}
\begin{verbatim}
getwd()
setwd(dir)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{dir}] A character string.
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{getwd} returns a character vector, or \code{NULL} if the
working directory is not available on that platform.

\code{setwd} returns \code{NULL} invisibly.  It will give an error if
it does not succeed.
\end{Value}
\begin{Note}\relax
These functions are not implemented on all platforms.
\end{Note}
\begin{SeeAlso}\relax
\code{\LinkA{list.files}{list.files}} for the \emph{contents} of a directory.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
(WD <- getwd())
if (!is.null(WD)) setwd(WD)
\end{ExampleCode}
\end{Examples}

