validate (version 0.9.3)

is_complete: Test for completeness of records

Description

Utility function to make common tests easier.

Usage

is_complete(...)

all_complete(...)

Arguments

...

When used in a validation rule: a bare (unquoted) list of variable names. When used directly, a comma-separated list of vectors of equal length.

Value

For is_complete A logical vector that is FALSE for each record that has a duplicate.

For all_unique a single TRUE or FALSE.

See Also

Other cross-record-helpers: exists_any(), is_unique()

Examples

Run this code
# NOT RUN {
d <- data.frame(X = c('a','b',NA,'b'), Y = c(NA,'apple','banana','apple'), Z=1:4)
v <- validator(is_complete(X, Y))
values(confront(d, v))

# }

Run the code above in your browser using DataCamp Workspace