create_entity_all: Quickly create all EML entity list objects.

View source: R/create_entity_all.R

create_entity_allR Documentation

Quickly create all EML entity list objects.

Description

. Use to quickly create EML entity list objects from all entities listed in dataset.

Usage

create_entity_all(
  meta_list,
  file_dir = getwd(),
  dataset_id,
  entity_numbers = NULL,
  skip_checks = FALSE
)

Arguments

meta_list

(character) A list of dataframes containing metadata returned by get_meta.

file_dir

(character) Path to directory containing flat files (data files). Defaults to current R working directory.

dataset_id

(numeric) A dataset ID.

entity_numbers

(numeric) Vector of entity numbers to include. Defaults to all of them. Use only when you need to delibrately exclude a couple entities.

skip_checks

(logical) Whether to skip checking for attribute congruence. Defaults to FALSE.

Value

(list) A list containing all data entities from dataset. Use this in the 'entity_list' argument for create_EML. First level list elements are grouped by entity types present in dataset and named accordingly. Each first level element is a list of unnamed lists; the number of elements correspond to how many entities of each type are present in dataset. Second level elements are analogous to output from create_entity.

Examples

## Not run: 
# continued from \code{\link{get_meta}}
entities <- create_entity_all(meta_list = metadata, dataset_id = 1)

## End(Not run)


atn38/metabase-to-eml-R documentation built on June 12, 2025, 6:18 p.m.