Displaying 1 result from an estimated 1 matches for "tp4630716".
2012 May 21
3
Prevent calculation when only NA
...ld add in my function? Thanks a lot!
get.max.cor <- function(station, mat){
mat[row(mat) == col(mat)] <- -Inf
which( mat[station, ] == max(mat[station, ], na.rm=TRUE) )
}
--
View this message in context: http://r.789695.n4.nabble.com/Prevent-calculation-when-only-NA-tp4630716.html
Sent from the R help mailing list archive at Nabble.com.