create_keywordSet: create_keywordSet

View source: R/create_keywordSet.R

create_keywordSetR Documentation

create_keywordSet

Description

create_keywordSet generates a list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset

Usage

create_keywordSet(keywordsFile)

Arguments

keywordsFile

The quoted path and name of the keywords file.

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.

Value

list of keywords and attributes that is suitable for passing to the keywordSet parameter of a eml$dataset

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)


CAPLTER/capeml documentation built on April 3, 2024, 11:17 p.m.