Re: [R] Problem: using cor.test with by( )

From: Liviu Andronic <landronimirc_at_gmail.com>
Date: Sun, 30 Mar 2008 23:21:33 +0200

On Sun, Mar 30, 2008 at 7:11 PM, Che-hsu (Joe) Chang <chjchang_at_gmail.com> wrote:
> Basically, I want to calculate the correlation between variable A and B for
> every subject in my study. (yep, that simple)
>
> What I did is this:
> by(data, id, function (x) cor.test(A,B, data=x))

This recent thread [1] might prove of interest. Liviu

[1] http://www.nabble.com/p-value-in-Spearman-rank-order-tt15738907.html



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 Sun 30 Mar 2008 - 21:28:30 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 Sun 30 Mar 2008 - 21:30:28 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