powered by
Remove columns in a matrix that contains one or more NAs
removeColumnsWithNA(mat)
A matrix, with columns containing one or more NAs removed
A matrix
myMat <- matrix(c(1:9, NA, 10:17), nrow=6, byrow=TRUE, dimnames=list(sprintf("R%d", 1:6), sprintf("C%d", 1:3))) removeColumnsWithNA(myMat)
Run the code above in your browser using DataLab