[R] Prevent calculation when only NA

jeff6868 geoffrey_klein at etu.u-bourgogne.fr
Mon May 21 15:28:25 CEST 2012


I tried your function. It works great thanks. I used then diag() in order to
have the value "1" for the whole diagonal of my matrix. But it still doesn't
work.... it's crazy.
By deleting colums and rows (and so some files) containing only NAs in the
correlation matrix, it doesn't work when I apply the function, because I'm
working on a list of files.
By deleting the files in the correlation matrix, it cannot apply the
function on the list.files (dimensions are different if I delete some files
in the correlation). And as I don't know before the calculation which files
are going to contain these NA columns and rows, I have to do it on another
way. 
I think I should first select the files for my list (and for the
correlation) which contains at least for example 1000 numeric values in a
certain array in order to calculate my correlations. But i'll post it in
another topic.


--
View this message in context: http://r.789695.n4.nabble.com/Prevent-calculation-when-only-NA-tp4630716p4630752.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list