[R] Problem: using cor.test with by( )
Liviu Andronic
landronimirc at gmail.com
Sun Mar 30 23:21:33 CEST 2008
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
More information about the R-help
mailing list