
Read Milestones YAML files into the package's data tables
Source:R/milestones-yaml.R
read_milestones_yaml.RdReads a folder written by export_milestones_yaml() (and possibly edited since) and
rebuilds the Milestones tables: milestone, author, reference, mediaitem,
keyword, aspect, subject and the milestone2* link tables. They have the same
columns as the datasets in this package.
Details
Authors, references, keywords, aspects and subjects named in a milestone file must exist
in authors.yaml, references.yaml and vocabulary.yaml. Every problem found is
reported in one error message. Milestones, authors or references without an id: get
the next free id. Media item ids (miid) are assigned in order, so they are not stable
across edits.
Examples
if (FALSE) { # \dontrun{
dir <- file.path(tempdir(), "milestones-yaml")
export_milestones_yaml(dir, overwrite = TRUE)
tabs <- read_milestones_yaml(dir)
names(tabs)
head(tabs$milestone)
} # }