Skip to contents

Reads 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.

Usage

read_milestones_yaml(dir)

Arguments

dir

Folder containing milestones/, authors.yaml, references.yaml and vocabulary.yaml.

Value

A named list of data frames.

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)
} # }