Checks that an ssfs object contains the 8 required tables and that each table contains its required columns. Returns the object invisibly if valid; throws an informative error otherwise.
Arguments
- x
An object to validate, typically created by
new_ssfs()orgtfs_to_ssfs().- verbose
When TRUE, prints a message if the SSFS is valid.
Examples
# Run validation. Console messages will indicate missing tables, missing vectors (columns), or incorrect class / data type
if (FALSE) { # \dontrun{
bad <- ligne_jaune
bad$hsh <- NULL
validate_ssfs(bad)
} # }
# "ssfs is valid." message appears if ssfs is valid
validate_ssfs(ligne_jaune,verbose=TRUE)
#> ✔ ssfs is valid.
