[R] complex splits

Tim Wilson wilson at visi.com
Fri Aug 16 01:25:23 CEST 2002


Hi everyone,

I'm having trouble figuring out how to split a dataframe more than once.

Let's say I have a dataframe d with a certain column called splitcol
composed of four possible ordinal values.  The same dataframe has
two other columns, col1 and col2, that have one of two possible values
each. I'd like to split d$splitcol based on col1 and col2 so I can report
frequencies of the subgroups.

So if col1 and col2 can each have two different values, after splitting
I should have four vectors based on d$splitcol.

Can I do this in one step, or do I need to do some intermediate
splitting?

-Tim

-- 
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