dp_check_field {datapackage} | R Documentation |
Check if a vector is valid given a field descriptor
Description
Check if a vector is valid given a field descriptor
Usage
dp_check_field(
x,
fielddescriptor,
constraints = TRUE,
tolerance = sqrt(.Machine$double.eps)
)
Arguments
x |
vector to test |
fielddescriptor |
field descriptor to test the vector against |
constraints |
also check relevant constraints in the field descriptor. |
tolerance |
numerical tolerance used in some of the tests |
Value
Returns TRUE
when the field is valid. Returns a character vector with
length >= 1 if the field is not valid. The text in the character values
indicates why the field is not valid.
See Also
Use isTRUE
to check if the test was successful.
See dp_check_dataresource
for a function that checks a complete data set.
[Package datapackage version 0.2.3 Index]