\Header{data.frame}{Data Frames}
\alias{as.data.frame}{data.frame}
\alias{is.data.frame}{data.frame}
\alias{row.names}{data.frame}
\alias{row.names$\leftarrow $}{data.frame}
\alias{print.data.frame}{data.frame}
\alias{plot.data.frame}{data.frame}
\alias{as.data.frame.AsIs}{data.frame}
\alias{as.data.frame.character}{data.frame}
\alias{as.data.frame.complex}{data.frame}
\alias{as.data.frame.data.frame}{data.frame}
\alias{as.data.frame.default}{data.frame}
\alias{as.data.frame.factor}{data.frame}
\alias{as.data.frame.integer}{data.frame}
\alias{as.data.frame.list}{data.frame}
\alias{as.data.frame.logical}{data.frame}
\alias{as.data.frame.matrix}{data.frame}
\alias{as.data.frame.model.matrix}{data.frame}
\alias{as.data.frame.numeric}{data.frame}
\alias{as.data.frame.ordered}{data.frame}
\alias{as.data.frame.ts}{data.frame}
\alias{as.data.frame.vector}{data.frame}
\alias{xpdrows.data.frame}{data.frame}
\keyword{classes}{data.frame}
\keyword{methods}{data.frame}
\begin{Usage}
\begin{verbatim}
data.frame(..., row.names = NULL, check.rows = FALSE,
        check.names = TRUE)

as.data.frame(x)
is.data.frame(x)

row.names(data.frame.obj)
row.names(data.frame.obj) <- names
print(data.frame.obj, ..., digits = NULL, quote = FALSE, right = TRUE)
plot (data.frame.obj, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{...}] these arguments are of either the form \texttt{value} or
\texttt{tag=value}.  Component names are created based on the tag (if
present) or the deparsed argument itself.
\item[\texttt{row.names}] a character vector giving the row names for the data
frame.
\item[\texttt{check.rows}] if \texttt{TRUE} then the rows are checked for
consistency of length and names.
\item[\texttt{check.names}] if \texttt{TRUE} then the names of the variables
in the data frame are checked to ensure that they are valid
variable names.  If necessary they are adjusted (by
\texttt{\Link{make.names}}) so that they are.
\item[\texttt{data.frame.obj}] objects of class \texttt{data.frame}.
\item[\texttt{...}] optional arguments to \texttt{print} or \texttt{plot} methods.
\end{ldescription}
\end{Arguments}
\begin{Value}
For \texttt{data.frame(.)} a data frame.  Data frames are the
fundamental data structure used by
most of \R's modeling software.  They are tightly coupled collections
of variables which share many of the properties of matrices.  The main
difference being that the columns of a data frame may be of differing
types (numeric, factor and character).

\texttt{as.data.frame} is generic function with many \texttt{\Link{methods}}.
It attempts to coerce its argument to be a data frame.

\texttt{is.data.frame} returns \texttt{TRUE} if its argument is a data
frame and \texttt{FALSE} otherwise.

\texttt{row.names} can be used to set and retrieve the row names of a
data frame, similarly to \texttt{\Link{rownames}} for arrays.

\texttt{plot.data.frame}, a method of the \texttt{\Link{plot}} generic,
uses \texttt{\Link{stripplot}} for \emph{one} variable,
\texttt{\Link{plot.default}} (scatterplot) for \emph{two} variables, and
\texttt{\Link{pairs}} (scatterplot matrix) otherwise.

For the \texttt{\Link{print}} method (\texttt{print.data.frame}), see
\texttt{\Link{print.matrix}}.

\texttt{xpdrows.data.frame} is an auxiliary function which expands the
rows of a data frame.  It is used by the data frame methods of
\texttt{[<-} and \texttt{[[<-} (which perform subscripted assignments on a
data frame), and not intended to be called directly.\end{Value}
\begin{SeeAlso}
\texttt{\Link{read.table}}, \texttt{\Link{Math.data.frame}},etc, about
\emph{Group} methods for \texttt{data.frame}s;  \texttt{\Link{make.names}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
L3 <- LETTERS[1:3]
str(d <- data.frame(cbind(x=1, y=1:10), ch=sample(L3, 10, repl=TRUE)))
str(     data.frame(cbind(  1,   1:10),    sample(L3, 10, repl=TRUE)))
is.data.frame(d)
all(1:10 == row.names(d))# TRUE (coercion)
\end{ExampleCode}
\end{Examples}

