[R] extracting data from a dataframe

Tim Wilson wilson at visi.com
Fri Aug 2 17:31:46 CEST 2002


Hi everyone,

Here's a question about extracting data from a dataframe:

Let's say I've got a dataframe with two vectors, TEST and GENDER. GENDER
contains a 1 for males and 2 for females. I want to separate the results
of TEST by GENDER so I can compare their means.

What's the most efficient way to do this with R?

-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