The R Project SVN R

Rev

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

Rev 57267 Rev 57269
Line 29... Line 29...
29
  \item{x}{a list or data frame to be stacked or unstacked.}
29
  \item{x}{a list or data frame to be stacked or unstacked.}
30
  \item{select}{an expression, indicating which variable(s) to select from a
30
  \item{select}{an expression, indicating which variable(s) to select from a
31
    data frame.}
31
    data frame.}
32
  \item{form}{a two-sided formula whose left side evaluates to the
32
  \item{form}{a two-sided formula whose left side evaluates to the
33
    vector to be unstacked and whose right side evaluates to the
33
    vector to be unstacked and whose right side evaluates to the
34
    indicator of the groups to create.  Defaults to \code{formula(x)}
34
    indicator of the groups to create.  Defaults to \code{\link{formula}(x)}
35
    in the data frame method for \code{unstack}.}
35
    in the data frame method for \code{unstack}.}
36
  \item{\dots}{further arguments passed to or from other methods.}
36
  \item{\dots}{further arguments passed to or from other methods.}
37
}
37
}
38
\details{
38
\details{
39
  The \code{stack} function is used to transform data available as
39
  The \code{stack} function is used to transform data available as
Line 41... Line 41...
41
  be used in an analysis of variance model or other linear model.  The
41
  be used in an analysis of variance model or other linear model.  The
42
  \code{unstack} function reverses this operation.
42
  \code{unstack} function reverses this operation.
43
 
43
 
44
  Note that \code{stack} applies to \emph{vectors} (as determined by
44
  Note that \code{stack} applies to \emph{vectors} (as determined by
45
  \code{\link{is.vector}}): non-vector columns (e.g., factors) will be
45
  \code{\link{is.vector}}): non-vector columns (e.g., factors) will be
-
 
46
  ignored (with a warning as from \R 2.15.0).  Where vectors of
46
  ignored.  Where vectors of different types are selected they are
47
  different types are selected they are concatenated by
47
  concatenated by \code{\link{unlist}} whose help page explains how the
48
  \code{\link{unlist}} whose help page explains how the type of the
48
  type of the result is chosen.
49
  result is chosen.
49
 
50
 
50
  These functions are generic: the supplied methods handle data frames
51
  These functions are generic: the supplied methods handle data frames
51
  and objects coercible to lists by \code{\link{as.list}}.
52
  and objects coercible to lists by \code{\link{as.list}}.
52
}
53
}
53
 
54