add_datatable.Rd
Adds the data table elements to a dataset list according to EML standards.
add_datatable(parent_element, datatable_metadata)
A list representing the EML project or dataset.
A named list or dataframe containing datatable metadata elements
(filepath, attribute_info, datatable_description, and additional optional columns): see create_datatable
The dataset list or project with datatable information appended.
datatable_metadata <- dplyr::tibble(filepath = c(system.file("extdata", "Banet-Example", "data", "enclosure-study-growth-rate-data.csv",
package = "EMLaide", mustWork = TRUE),
system.file("extdata", "Banet-Example", "data", "enclosure-study-gut-contents-data.csv",
package = "EMLaide", mustWork = TRUE)),
attribute_info = c(system.file("extdata", "Banet-Example", "metadata", "enclosure-study-growth-rates-metadata.xlsx",
package = "EMLaide", mustWork = TRUE),
system.file("extdata", "Banet-Example", "metadata", "enclosure-study-gut-contents-metadata.xlsx",
package = "EMLaide", mustWork = TRUE)),
datatable_description = c("Growth Rates - Enclosure Study",
"Gut Contents - Enclosure Study"))
if (FALSE) {
dataset <- list() %>%
add_datatable(datatable_metadata)
dataset
}