DMwR (version 0.4.1)

manyNAs: Find rows with too many NA values

Description

Small utility function to obtain the number of the rows in a data frame that have a "large" number of unknown values. "Large" can be defined either as a proportion of the number of columns or as the number in itself.

Usage

manyNAs(data, nORp = 0.2)

Arguments

data
A data frame with the data set.
nORp
A number controlling when a row is considered to have too many NA values (defaults to 0.2, i.e. 20% of the columns). If no rows satisfy the constraint indicated by the user, a warning is generated.

Value

A vector with the IDs of the rows with too many NA values. If there are no rows with many NA values and error is generated.

References

Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).

http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR

See Also

complete.cases, na.omit

Examples

Run this code
data(algae)
manyNAs(algae)

Run the code above in your browser using DataLab