create_keywordSet
create_keywordSet.Rd
create_keywordSet generates a list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset
Value
list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset
Details
A keywordSet entity is created from a single data file (.csv) with the fields: thesaurus, keyword, and type where type is an intended (but optional) attribute for the keyword.
Examples
# After first generating a keyword template csv with write_keywords(), a
# EML::eml$keywordSet() entity can be generated from the data provided in the
# template csv:
# keywords <- create_keywordSet('keywords.csv')
# The workflow harvests keyword metadata from the keyword template generated by
# write_keywords() (i.e., keywords.csv) with the columns: thesaurus, keyword,
# and type, where type is an optional attribute that will be associated with
# the keyword EML/XML element.
# The EML::eml$keywordSet() entity (`keywords` in this example) can then be
# added to a EML::eml$dataset() entity:
# dataset <- EML::eml$dataset(keywordSet = keywords)