[R] Is there a "by()" function in R like in S?
Sven Garbade
garbade at mip.paed.uni-muenchen.de
Mon Jan 31 12:51:18 CET 2000
Hallo R-users,
I'm a R (release 0.65) novice, but have read some about S. Is there a
similar function in R like the S function "by()" ?
This function groups data typically from a matrix by a variable and
applies a function on the grouped data. Example in S:
> by(data, year, summary)
where "data" is a matrix containing the variable "year". After grouping
the matrix to variable "year", the function "summary" is applied to each
group.
Thanks,
Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list