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

2008-03-30 Thread Liviu Andronic
On Sun, Mar 30, 2008 at 7:11 PM, Che-hsu (Joe) Chang <[EMAIL PROTECTED]> 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 t

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

2008-03-30 Thread Peter Dalgaard
Che-hsu (Joe) Chang wrote: > Hello everyone, > > > > I'm a new R user switching from SAS and JMP. In the first few days, I have > been trying to do a fairly simple task but yet found no success. I've > checked the help archive as well as few R textbooks but didn't seem to find > the answer. So,

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

2008-03-30 Thread Che-hsu (Joe) Chang
Hello everyone, I'm a new R user switching from SAS and JMP. In the first few days, I have been trying to do a fairly simple task but yet found no success. I've checked the help archive as well as few R textbooks but didn't seem to find the answer. So, please help me if you can. Basically,