%matches%.data.frame | R Documentation |
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.
## S3 method for class 'data.frame'
x %matches% y, ...
x |
spec |
y |
coerced to spec (spec object or filepath for spec file). |
... |
passed arguments |
logical; TRUE if all checks above are enforceable.
Other matches:
%matches%.character()
,
%matches%.spec()
,
%matches%()
data(drug)
file <- tempfile()
spec <- specification(drug, tol = 3)
write.spec(spec, file = file)
drug %matches% spec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.