Re: [R] cor vs cor.test

2009-07-07 Thread Godmar Back
Thanks, Peter. You're right, I mistyped and getOption('na.action') shows na.omit. Perhaps my question was more commentary about my perceived lack of rationale and orthogonality in R than it should have been. Presumably, q[[i]] is a data frame and q[[i]][,1] is a numeric vector, so cor and cor.tes

Re: [R] cor vs cor.test

2009-07-07 Thread Peter Ehlers
?cor says that cor() can be applied to 'numeric vector, matrix or data frame' ?cor.test requires 'numeric vectors of data values' So, what's your q? As to na.action: ?cor.test makes no reference to na.action for the default method. Looking at the code of cor.test.default shows that only compl

[R] cor vs cor.test

2009-07-07 Thread Godmar Back
Hi, I am trying to use R for some survey analysis, and need to compute the significance of some correlations. I read the man pages for cor and cor.test, but I am confused about - whether these functions are intended to work the same way - about how these functions handle NA values - whether cor.t