David Winsemius wrote:
>
> t.test expects two numeric vectors, not a numeric vector and a
> grouping indicator.
>
> > t.test(dataset[dataset$Color=="RED", "Score"], dataset[dataset
> $Color=="WHITE", "Score"] )
>
>
Thank you again, David! I also just realized I could have replaced the
comma with a tilde, as in
t.test(Score~Color). What a difference a character makes!
John
--
View this message in context:
http://www.nabble.com/Selecting-groups-with-R-tp25088073p25088645.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.