\Header{remove}{Remove Objects from a Specified Environment}
\alias{rm}{remove}
\keyword{environment}{remove}
\begin{Description}\relax
\code{remove} and \code{rm} can be used to remove objects.  These can
be specified successively as character strings, or in the character
vector \code{list}, or through a combination of both.  All objects
thus specified will be removed.

If \code{envir} is NULL then the the currently active environment is
searched first.

If \code{inherits} is \code{TRUE} then parents of the supplied
directory are searched until a variable with the given name is
encountered.  A warning is printed for each variable that is not
found.\end{Description}
\begin{Usage}
\begin{verbatim}
remove(..., list = character(0), pos = -1, envir = pos.to.env(pos),
       inherits = FALSE)
rm    (..., list = character(0), pos = -1, envir = pos.to.env(pos),
       inherits = FALSE)
\end{verbatim}
\end{Usage}
\begin{SeeAlso}\relax
\code{\Link{ls}}, \code{\Link{objects}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
tmp <- 1:4
## work with tmp  and cleanup
rm(tmp)


## remove (almost) everything in the working environment.
## You will get no warning, so don't do this unless you are really sure.
rm(list = ls())
\end{ExampleCode}
\end{Examples}

