check if value is 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
> which( !is.na(p), arr.ind=TRUE)
row col
[1,] 1 2
[2,] 1 3
[3,] 2 4
[4,] 4 5
[5,] 2 7
which( !is.na(p), arr.ind=TRUE)
> which( !is.na(p), arr.ind=TRUE)
row col
[1,] 1 2
[2,] 1 3
[3,] 2 4
[4,] 4 5
[5,] 2 7