powered by
Removes diagonal of NA's from matrix.
rmdiag(M)
Matrix
matrix with diagonal of 0's.
# NOT RUN { M=array(rnorm(3*3), dim=c(3,3)) M[as.logical(diag(3))] = NA M=rmna(M) # }
Run the code above in your browser using DataLab