validate_metadata {inldata} | R Documentation |
Validate Metadata
Description
Validates the Extensible Markup Language (XML) formatted metadata
that is intended for a USGS data release.
Checks your FGDC-compatible geospatial metadata record using
mp (metadata parser).
Requires the mp
executable is on your path.
Download and install the software if not found.
Usage
validate_metadata(file, destdir = NULL, opts = c("e", "h", "f"), error = FALSE)
Arguments
file |
'character' string. Path to a XML formatted metadata file that contains the information for a USGS data release. |
destdir |
'character' string.
Destination directory to write files, with tilde-expansion performed.
Defaults to the |
opts |
'character' vector.
Output option codes.
Choose from one or more of the following codes:
|
error |
'logical' flag.
Whether to stop execution if validation errors are found (default is |
Value
Invisibly returns a flag indicating whether validation errors were found.
Returns NA
if mp executable is not accessible.
Author(s)
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
See Also
make_data_release
function for creating a USGS data release.
Examples
validate_metadata(
file = system.file("extdata/test.xml", package = "inldata"),
destdir = "validate"
)
list.files("validate")
unlink("validate", recursive = TRUE)