View source: R/dp_check_dataresource.R
dp_check_dataresource | R Documentation |
Check if a data set is valid given a Data Resource
dp_check_dataresource(
x,
dataresource = attr(x, "resource"),
constraints = TRUE,
throw = FALSE,
tolerance = sqrt(.Machine$double.eps)
)
x |
|
dataresource |
|
constraints |
also check relevant constraints in the field descriptor. |
throw |
generate an error if the data set is not valid according to the dataresource. |
tolerance |
numerical tolerance used in some of the tests |
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.
When throw = TRUE
the function will generate an error instead of
returning a character vector. When the dataset is valid the function returns
TRUE
invisibly.
Use isTRUE
to check if the test was successful.
See dp_check_field
for a function that checks a column or vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.