Skip to contents

A schema is an xml document that maps the files and field names in a DwCA. It works by detecting column names on csv files in a specified directory; these should all be Darwin Core terms for this function to produce reliable results.

Usage

build_schema(source = "data", destination = "./data/meta.xml")

Arguments

source

A directory (not a file) containing files to be documented in the schema document. Defaults to the data folder within the current working directory. Note that files that do not match the Darwin Core naming convention and/or do not end in .csv are ignored.

destination

A file name for the resulting schema document. Defaults to ./data/meta.xml for consistency with the Darwin Core standard.

Value

Does not return an object to the workspace; called for the side effect of building a file named meta.xml in the specified directory.