The R Project SVN R

Rev

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

Rev 24700 Rev 27447
Line 41... Line 41...
41
  To add all the rows of a matrix (ie, a single \code{group}) use
41
  To add all the rows of a matrix (ie, a single \code{group}) use
42
  \code{\link{rowSums}}, which should be even faster.
42
  \code{\link{rowSums}}, which should be even faster.
43
}
43
}
44
 
44
 
45
\seealso{
45
\seealso{
46
  \code{\link{tapply}}, \code{\link{aggregate}},\code{\link{rowSums}}
46
  \code{\link{tapply}}, \code{\link[stats]{aggregate}}, \code{\link{rowSums}}
47
}
47
}
48
\examples{
48
\examples{
49
x <- matrix(runif(100), ncol=5)
49
x <- matrix(runif(100), ncol=5)
50
group <- sample(1:8, 20, TRUE)
50
group <- sample(1:8, 20, TRUE)
51
xsum <- rowsum(x, group)
51
xsum <- rowsum(x, group)