Skip to content
Prev 22340 / 398502 Next

extracting data from a dataframe

results
Presuming that you wish to perform a two-sample t-test on the means, you
don't need to actually "split" the dataframe. You could use the formula
method for t.test() by the following:

t.test(df$TEST ~ df$GENDER)

where df is the name of your dataframe.

If you actually want to split the dataframe, see ?split.

HTH.

Marc


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