rmNA: Remove Columns and Rows with Missing Data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rmNA.R

Description

Remove columns and rows that contain only missing values from a data frame or a matrix

Usage

1
rmNA(dat, remove = TRUE, verbose = FALSE)

Arguments

dat

A data frame or a matrix

remove

if TRUE columns and rows containing only missing values are removed, if FALSE a list of identified columns and rows is returned

verbose

if TRUE the removed columns and rows are printed on the console.

Value

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.

Author(s)

Martin Hecht

See Also

rmNAcols, rmNArows

Examples

1
2
3
4
(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)

eatTools documentation built on May 2, 2019, 4:44 p.m.

Related to rmNA in eatTools...