Use these function to determine the validity of a stw_dict or stw_meta object;
stw_check() tells you about the object, stw_validate() additionally throws
an error if warranted. To support piping, these functions return their first
argument invisibly.
stw_check(...) # S3 method for default stw_check(...) # S3 method for stw_dict stw_check(dict, verbosity = c("error", "info", "all", "none"), ...) # S3 method for stw_meta stw_check(meta, verbosity = c("error", "info", "all", "none"), ...) # S3 method for stw_dataset stw_check(dataset, verbosity = c("error", "info", "all"), ...) stw_validate(...) # S3 method for default stw_validate(...) # S3 method for stw_dict stw_validate(dict, verbosity = c("error", "info", "all"), ...) # S3 method for stw_meta stw_validate(meta, verbosity = c("error", "info", "all"), ...) # S3 method for stw_dataset stw_validate(dataset, verbosity = c("error", "info", "all"), ...)
| ... | other arguments (not used) |
|---|---|
| dict | Object with S3 class |
| verbosity |
|
| meta | Object with S3 class |
| dataset | Object with S3 class |
modified copy of dict or meta
You can specify the verbosity:
"error"reports results of all checks that failed
"info"reports results of all checks that failed, and that find missing optional information
"all"reports results of all checks
"none"reports no results
The "none" option may not seem intuitive, it is for internal use.
These functions set an internal attribute of the object to inicate its
validity.
For a stw_dict object, each name nust be unique and non-trivial,
each description must be non-trivial, type is optional.
For a stw_meta object, it must have a non-trivial name, and dict.
It may have a title, description, source, n_row, and n_col.
stw_check(diamonds_meta$dict)