naRows: Index of rows in a data frame or matrix that contain at least...

Description Usage Arguments Value Examples

View source: R/naRows.r

Description

This function returns the row number of any row in a data frame or matrix that has at least one NA.

Usage

1
naRows(x, inf = FALSE, inverse = FALSE)

Arguments

x

Data frame or matrix.

inf

Logical, if TRUE then also return row numbers of rows in which at least one element is Inf or -Inf. The default is FALSE.

inverse

Logical, if TRUE then return row numbers of rows that do not have NAs (and possibly Inf or -Inf). The default is FALSE.

Value

Integer vector.

Examples

1
2
x <- data.frame(a=1:5, b=c(1, 2, NA, 4, 5), c=c('a', 'b', 'c', 'd', NA))
naRows(x)

adamlilith/omnibus documentation built on Nov. 21, 2018, 11:01 a.m.