The R Project SVN R

Rev

Rev 27447 | Rev 30461 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27447 Rev 27928
Line 14... Line 14...
14
\alias{as.data.frame.model.matrix}
14
\alias{as.data.frame.model.matrix}
15
\alias{as.data.frame.numeric}
15
\alias{as.data.frame.numeric}
16
\alias{as.data.frame.ordered}
16
\alias{as.data.frame.ordered}
17
\alias{as.data.frame.ts}
17
\alias{as.data.frame.ts}
18
\alias{as.data.frame.vector}
18
\alias{as.data.frame.vector}
-
 
19
\alias{as.data.frame.array}
19
 
20
 
20
\title{
21
\title{
21
  Coerce to a Data Frame
22
  Coerce to a Data Frame
22
}
23
}
23
\description{
24
\description{
Line 48... Line 49...
48
 
49
 
49
  If a list is supplied, each element is converted to a column in the
50
  If a list is supplied, each element is converted to a column in the
50
  data frame.  Similarly, each column of a matrix is converted separately.
51
  data frame.  Similarly, each column of a matrix is converted separately.
51
  This can be overridden if the object has a class which has
52
  This can be overridden if the object has a class which has
52
  a method for \code{as.data.frame}: two examples are
53
  a method for \code{as.data.frame}: two examples are
53
  matrices of class \code{"\link[stats]{model.matrix}"} (which are included as a
54
  matrices of class \code{"\link[stats]{model.matrix}"} (which are
54
  single column) and list objects of class \code{"\link{POSIXlt}"} which are
55
  included as a single column) and list objects of class
-
 
56
  \code{"\link{POSIXlt}"} which are coerced to class
55
  coerced to class \code{"\link{POSIXct}"}
57
  \code{"\link{POSIXct}"}.
-
 
58
 
-
 
59
  As from \R 1.9.0 arrays can be converted.  One-dimensional arrays are
-
 
60
  treated like vectors and two-dimensional arrays like matrices.  Arrays
-
 
61
  with more than two dimensions are converted to matrices by
-
 
62
  \sQuote{flattening} all dimensions after the first and creating
-
 
63
  suitable column labels.
56
 
64
 
57
  Character variables are converted to factor columns unless protected
65
  Character variables are converted to factor columns unless protected
58
  by \code{\link{I}}.
66
  by \code{\link{I}}.
59
 
67
 
60
  If a data frame is supplied, all classes preceding \code{"data.frame"}
68
  If a data frame is supplied, all classes preceding \code{"data.frame"}