[R] complex splits

Tim Wilson wilson at visi.com
Fri Aug 16 02:42:30 CEST 2002

On Thu, Aug 15, 2002 at 02:30:08PM -1000, Pierre Kleiber wrote:
>    split(d$splitcol,paste(d$col1,d$col2))
> will give you vectors as elements of a list based on possible
> combinations of col1 and col2.  Is that what you're after?

No, when I try this I only get two groups based on d$col1. What I'm
looking for is a split on d$col1 (producing two groups) and a subsequent
split on d$col2 for a total of four groups. Then I'll do frequencies of
those four groups.


Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson at visi.com |  <dtml-var pithy_quote>  | http://linux.com
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