[R] How do you go beyond tapply()?

Art Salwin salwin at mitretek.org
Thu Mar 30 20:24:00 CEST 2000


"An Introduction to R" notes that the function tapply() can
be used to index a vector by multiple categories. But they
don't show how to do this.  How does one implement, for
example, the example in the text in which tax accountants
are indexed by both state and sex?

Is there a way to use tapply() to put the vector into bins
defined by the levels instead of having to exactly match the
levels?  It seems some sort of historgramming is what's
needed, but hist() does plots, not just the categorization
into bins.

-- 
Art Salwin
salwin at mitretek.org
(202) 863-2985
(202) 863-2988 (fax)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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