Adds the keyword metadata elements to a dataset list according to EML standards.

add_keyword_set(parent_element, keyword_metadata)

Arguments

parent_element

A list representing the EML project or dataset.

keyword_metadata

A named list or dataframe containing keyword elements: see create_keyword_set

Value

The dataset list or project with keyword information appended.

Examples

keyword_metadata <- dplyr::tibble(keyword = c("Sacramento River", 
                                              "Salmonid Habitat Restoration Projects", 
                                              "Effectiveness Monitoring", 
                                              "Pacific Salmon", 
                                              "CVPIA"), 
                                  keywordThesaurus = c(NA, NA, NA, NA, NA))

dataset <- list() %>%
     add_keyword_set(keyword_metadata)
dataset
#> $keywordSet
#> $keywordSet[[1]]
#> $keywordSet[[1]]$keyword
#> [1] "Sacramento River"                     
#> [2] "Salmonid Habitat Restoration Projects"
#> [3] "Effectiveness Monitoring"             
#> [4] "Pacific Salmon"                       
#> [5] "CVPIA"                                
#> 
#> 
#>