Re: [R] use logical in cor.test

2010-03-30 Thread pgseye
Many thanks Peter, This did indeed work. Regards, Paul -- View this message in context: http://n4.nabble.com/use-logical-in-cor-test-tp1744701p1746008.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing li

Re: [R] use logical in cor.test

2010-03-30 Thread Peter Ehlers
On 2010-03-30 2:41, pgseye wrote: Thanks for the replies. In response to Erik: What does Both[,1] show you? Both[,1] [1] 3.36 NA NA NA NA NA NA 3.92 3.50 NA NA NA NA 3.76 3.19 3.83 NA 3.66.. What does Both[,1]> 2.5 show you? Both[,1]>2.5 [1] TR

Re: [R] use logical in cor.test

2010-03-30 Thread pgseye
Thanks for the replies. In response to Erik: What does > Both[,1] show you? > Both[,1] [1] 3.36 NA NA NA NA NA NA 3.92 3.50 NA NA NA NA 3.76 3.19 3.83 NA 3.66.. What does > Both[,1] > 2.5 show you? > Both[,1]>2.5 [1] TRUENANANANANAN

Re: [R] use logical in cor.test

2010-03-29 Thread Bill.Venables
and Laboratories -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of pgseye Sent: Tuesday, 30 March 2010 2:41 PM To: r-help@r-project.org Subject: [R] use logical in cor.test Hi, I've got 4 variables that I want to effectively 'stac

Re: [R] use logical in cor.test

2010-03-29 Thread Erik Iverson
cor.test(Both[,1],Both[,2]) What does > Both[,1] show you? cor.test(Both[,1]>2.5,Both[,2]>2.5) What does > Both[,1] > 2.5 show you? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] use logical in cor.test

2010-03-29 Thread pgseye
Hi, I've got 4 variables that I want to effectively 'stack' so that I have a grand R variable and a grand L variable. This works to achieve that goal: Twin1cor<-with(twin.wide,cbind(ACDepthR.1,ACDepthL.1)) Twin2cor<-with(twin.wide,cbind(ACDepthR.2,ACDepthL.2)) Both<-rbind(Twin1cor,Twin2cor) >