Cor.test() takes vectors x and y as arguments, but I have an entire matrix of data that I want to test, pairwise. Cor() takes this matrix as an argument just fine, and I'm hoping to find a way to do the same for cor.test().
The common advice from other folks seems to be to use cor.prob():
https://stat.ethz.ch/pipermail/r-help/2001-November/016201.html
But these p-values are not the same as those generated by cor.test()!!! Cor.test() also seems better equipped to handle pairwise deletion (I have quite a bit of missing data in my data set) than cor.prob().
Does anybody have any alternatives to cor.prob()? If the solution involves nested for loops, so be it (I'm new enough to R for even this to be problematic for me).
lapplywithcor.testor vectorize the function and feed it toouteras seen in this link: stackoverflow.com/questions/9917242/…