manyNAs: Find rows with too many NA values

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/utils.R

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

1
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.

Author(s)

Luis Torgo ltorgo@dcc.fc.up.pt

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

1
2

Example output

Loading required package: lattice
Loading required package: grid
[1]  62 199

DMwR documentation built on May 1, 2019, 9:17 p.m.