Skip to contents

Reads yamlet from file. Similar to io_yamlet.character but also reads text fragments.

Usage

read_yamlet(
  x,
  ...,
  default_keys = getOption("yamlet_default_keys", list("label", "guide"))
)

Arguments

x

file path for yamlet, or vector of yamlet in storage syntax

...

passed to as_yamlet

default_keys

character: default keys for the first n anonymous members of each element

Value

yamlet: a named list with default keys applied

Examples

library(csv)
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
meta <- system.file(package = 'yamlet', 'extdata','quinidine.yaml')
x <- as.csv(file)
y <- read_yamlet(meta)
x <- decorate(x, meta = y)
stopifnot(identical(x, decorate(file)))