rmNA {eatTools} | R Documentation |
Remove columns and rows that contain only missing values from a data frame or a matrix
rmNA(dat, remove = TRUE, verbose = FALSE)
dat |
A data frame or a matrix |
remove |
if |
verbose |
if |
Either a list indicating which columns and which rows in the data contain only missing values or a data frame or matrix in which all columns and rows containing only missing values are removed.
Martin Hecht
(mat <- matrix(c(1,1,1,1,1,NA, 1,1,1,1,NA,NA, 1,1,1,NA,NA,NA, 1,1,NA,NA,NA,NA, 1,NA,NA,NA,NA,NA, NA,NA,NA,NA,NA,NA), ncol=6, byrow=TRUE)) rmNA(mat, verbose = TRUE) rmNA(mat, remove = FALSE)