EmptyRow: Check if any row of a table is empty

Usage Arguments Details Value See Also Examples

View source: R/EmptyRow.R

Usage

1
EmptyRow(x, ef = c(NA, -999, 0))

Arguments

x

table (data.frame/2D-matrix) to be checked for completely empty rows.

...

ef arguments passed to setEmptyCellsValue.

Details

Check if any row of a table is empty

Value

a list with TF, a logical vector with TRUE value corresponding with complete empty rows, and ID giving the row number of the empty rows.

See Also

if in the example flag = NA

x[ complete.cases(x),]

x[!complete.cases(x),]

Examples

1
2
3
4
5
6
7
8
flag <- NA
xe <- data.frame(a = 3:5, b = flag, c = flag)
xe[2, 1] <- flag
xe[1, 2] <- 0
xe[1, 1] <- 0
xe[3, 2] <- 3
print(xe)
EmptyRow(x = xe, ef = c(flag, 0))

mathphysmx/cleanTable documentation built on May 29, 2019, 2:51 p.m.