validate {datapack} | R Documentation |
Validate a SystemMetadata object.
Description
Validate a system metadata object, ensuring that required fields are present and of the right type.
Usage
validate(x, ...)
## S4 method for signature 'SystemMetadata'
validate(x, ...)
Arguments
x |
the instance to be validated |
... |
(Additional parameters) |
Value
logical, TRUE
if the SystemMetadata object is valid, else a list of strings detailing errors
See Also
Examples
library(XML)
doc <- xmlParseDoc(system.file("testfiles/sysmeta.xml", package="datapack"), asText=FALSE)
sysmeta <- new("SystemMetadata")
sysmeta <- parseSystemMetadata(sysmeta, xmlRoot(doc))
valid <- validate(sysmeta)
[Package datapack version 1.4.1 Index]