View source: R/create_keywordSet.R
create_keywordSet | R Documentation |
create_keywordSet generates a list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset
create_keywordSet(keywordsFile)
keywordsFile |
The quoted path and name of the keywords file. |
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.
list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.