remove rows or columns with missing values in a data.frame or matrix
Usage
rmNA(df1, margins = 1, maxNA.perc = 0.95, minNonNA.count = 5)
Arguments
- df1
data.frame or matrix
- margins
an int vector of 1 and 2 for rows and columns;
e.g. 2:1 means the removal order is column then row.
- maxNA.perc, minNonNA.count
maximum %NA or minimum non-NA items allowed
failure to match either leads to removal
Value
df1
after cleaning; data type is kept even if 0 or 1 row or column remains