grapes-matches-grapes-.data.frame: Check Whether Data Frame matches Spec

Description Usage Arguments Value See Also Examples

Description

Checks whether data.frame matches spec. Column names, count, and order are enforced. Encodings are enforced (all non-missing values must be valid codes). Integer and numeric ranges are enforced. Values of required are parsed and evaluated in data context: Where TRUE, the corresponding data value for column cannot be missing.

Usage

1
2
## S3 method for class 'data.frame'
x %matches% y, ...

Arguments

x

spec

y

coerced to spec (spec object or filepath for spec file).

...

passed arguments

Value

logical; TRUE if all checks above are enforceable.

See Also

Other matches: %matches%.character, %matches%.spec, %matches%

Examples

1
2
3
4
5
data(drug)
file <- tempfile()
spec <- specification(drug, tol = 3)
write.spec(spec, file = file)
drug \%matches\% spec

spec documentation built on May 2, 2019, 10:14 a.m.