Skip to contents

checkDataPackageMetadata() checks a metadata file (or list) before it is used, and lists all problems at once: the metadata of a data package (see createDataPackageMetadataTemplate() and createDataPackage()) or, if it has a collectionID, of a collection (see createCollectionMetadataTemplate() and uploadCollectionToZenodo()). These are the same checks that createDataPackage() and uploadCollectionToZenodo() run before they start.

Usage

checkDataPackageMetadata(metadata)

Arguments

metadata

path to a YAML file, or a named list with the same structure.

Value

A character vector with the problems found (empty if none), invisibly. The problems are also shown as message.

Author

Birgen Haest

Examples

# Check the example metadata template
# ===========================================================================
checkDataPackageMetadata(system.file("extdata", "dataPackage", "metadataTemplate.yaml",
  package = "birdscanR"
))
#> The data package metadata are valid.