I want to find all the names of columns with NA or missing data and store these column names in a vector.
NA
# create matrix a <- c(1,2,3,4,5,N
Like this?
colnames(mymatrix)[colSums(is.na(mymatrix)) > 0] # [1] "aa" "ee"