Learn R Programming

accumulate (version 1.0.0)

min_complete: Demand minimal number of complete records

Description

Demand minimal number of complete records

Usage

min_complete(n, vars = TRUE)

Value

a function that accepts a data frame and returns TRUE

when the number of complete records is larger than or equal to n

and otherwise FALSE.

Arguments

n

Minimal number of records that must be complete

vars

[TRUE|column index] Column index into the data to be tested (e.g. a character vectod with variable names or a numeric vector with column positions). The indexed columns will be testsed for completeness (absence of NA). Be default vars=TRUE meaning that all columns are taken into account.

See Also

Other helpers: frac_complete(), min_records()

Examples

Run this code

f <- min_complete(20)
f(women)  # FALSE (15 records)
f(mtcars) # TRUE (32 records)

Run the code above in your browser using DataLab