check if something is not na in r code example
Example 1: if not na in r
which( !is.na(p), arr.ind=TRUE)
Example 2: if not na in r
lapply(apply(p, 1, function(x) which(!is.na(x)) ) , paste, collapse=", ")
which( !is.na(p), arr.ind=TRUE)
lapply(apply(p, 1, function(x) which(!is.na(x)) ) , paste, collapse=", ")