[R] Using "subset" in correlation analysis

From: James J. Roper <jjroper_at_gmail.com>
Date: Wed, 19 Mar 2008 09:59:09 -0300

The correlation test function says that it can do a subset where one specifies the subsete vector. I cannot seem to get it to work.

For example, the command line is:

cor.test(adults$Alt, adults$Cab, alternative="greater", method="pearson")

So, let´s say my subset vector is "Sex". How would I state the command to get the test of that subset?

Thanks in advance.



      James J. Roper, Ph.D.

James J. Roper
Ecologia, Evolução e Dinâmicas Populacionais
de Vertebrados Terrestres

Caixa Postal 19034 81531-990 Curitiba, Paraná, Brasil
E-mail: jjroper_at_gmail.com <mailto:jjroper_at_gmail.com> Telefone: 55 41 33857249 celular: 55 41 99870543
Ecologia e Conservação na UFPR <
http://www.bio.ufpr.br/ecologia/> Home Page <http://jjroper.googlespages.com> Ars Artium Consulting <http://arsartium.googlespages.com> ______________________________________________ R-help_at_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.
Received on Wed 19 Mar 2008 - 13:02:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Mar 2008 - 17:30:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive