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. (2016) Data Mining using R: learning with case studies, second edition, Chapman & Hall/CRC (ISBN-13: 978-1482234893).

http://ltorgo.github.io/DMwR2

See Also

complete.cases, na.omit

Examples

1
2

Example output

[1]  62 199

DMwR2 documentation built on May 2, 2019, 1:42 p.m.