\Header{load}{Reload Saved Datasets}
\alias{loadURL}{load}
\keyword{file}{load}
\begin{Description}\relax
Reload the datasets written to a file with the function \code{save}.\end{Description}
\begin{Usage}
\begin{verbatim}
load(file, envir = parent.frame())
loadURL(url, envir = parent.frame(), quiet = TRUE, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{file}] a connection or a character string giving the name of the
file to load.
\item[\code{envir}] the environment where the data should be loaded.
\item[\code{url}] a character string naming a URL.
\item[\code{quiet, ...}] additional arguments to \code{\Link{download.file}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{load} can load \R{} objects saved in the current or any earlier
format.  It can read a compressed file (see \code{\Link{save}})
directly from a file or from a suitable connection.

\code{loadURL} is a convenience wrapper which downloads a file, loads
it and deletes the downloaded copy.\end{Details}
\begin{Value}
A character vector of the names of objects created, invisibly.\end{Value}
\begin{SeeAlso}\relax
\code{\Link{save}}, \code{\Link{download.file}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## save all data
save(list = ls(), file= "all.Rdata")

## restore the saved values to the current environment
load("all.Rdata")

## restore the saved values to the user's workspace
load("all.Rdata", .GlobalEnv)

## Don't run: 
## This example may not still be available
## print the value to see what objects were created.
print(loadURL("http://hesweb1.med.virginia.edu/biostat/s/data/sav/kprats.sav"))
## End Don't run
\end{ExampleCode}
\end{Examples}

