View source: R/validate_metadata.R
validate_metadata | R Documentation |
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.
validate_metadata(file, destdir = NULL, opts = c("e", "h", "f"), error = FALSE)
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 |
Invisibly returns a flag indicating whether validation errors were found.
Returns NA
if mp executable is not accessible.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
make_data_release
function for creating a USGS data release.
validate_metadata(
file = system.file("extdata/test.xml", package = "inldata"),
destdir = "validate"
)
list.files("validate")
unlink("validate", recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.