\Header{data}{Data Sets}
\alias{show.data}{data}
\keyword{documentation}{data}
\keyword{datasets}{data}
\begin{Usage}
\begin{verbatim}
data(..., list = character(0), package = c(.packages(),.Autoloaded),
     lib.loc = .lib.loc)
show.data(package = c(.packages(),.Autoloaded), lib.loc = .lib.loc)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{...}] a sequence of \texttt{name}s or character strings
\item[\texttt{list}] a character vector
\item[\texttt{package}] a name or character vector giving the packages to look
into for data sets.
By default, all packages in the search path are used.
\item[\texttt{lib.loc}] a character vector of directory names of \R\ libraries.
Defaults to all libraries currently known.
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{data} loads or lists via \texttt{show.data} the available data sets.
The data sets to be loaded can be specified as a sequence of \texttt{name}s
or character strings, or as the character vector \texttt{list}, or as both.

If no data sets are specified or \texttt{show.data} is called directly,
the available data sets are displayed.

Currently, four formats of data files are supported:
\Enumerate{
\item files ending \texttt{".RData"} or \texttt{".rda"} are
\texttt{\Link{load}()ed}. 
\item files ending \texttt{".R"} or \texttt{".r"} are
\texttt{\Link{source}()d} in.
\item files ending \texttt{".tab"} or \texttt{".txt"} are read using
\texttt{\Link{read.table}(..., header = TRUE)}, and hence result in
a \texttt{\Link{data.frame}}.
\item files ending \texttt{".csv"} are read using
\texttt{\Link{read.table}(..., header = TRUE, sep=";")},
and also result in a \texttt{\Link{data.frame}}.
}\end{Description}
\begin{Details}
If no data sets are specified, \texttt{data} calls \texttt{show.data}.
\texttt{show.data} looks for a file \file{00Index} (failing that the
deprecated convention of \file{index.doc}) in a \file{data}
directory of each specified package, and uses these files to prepare
a listing. If there is a \file{data} area but no index a warning is
given: such packages are incomplete.\end{Details}
\begin{Value}
A character vector of all data sets specified, an empty character
vector if none were specified.\end{Value}
\begin{SeeAlso}
\texttt{\Link{help}} for obtaining documentation on data sets.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data()                       # list all available data sets
data(package = base)         # list the data sets in the base package
data(crimes, "deaths")       # load the data sets `crimes' and `deaths'
help(crimes)                 # give information on data set `crimes'
\end{ExampleCode}
\end{Examples}

