Learn R Programming

raveio (version 0.9.0)

save_yaml: Write named list to file

Description

Write named list to file

Usage

save_yaml(x, file, ..., sorted = FALSE)

Value

Normalized file path

Arguments

x

a named list, fastmap2, or anything that can be transformed into named list via as.list

file, ...

passed to write_yaml

sorted

whether to sort the results by name; default is false

See Also

fastmap2, load_yaml, read_yaml, write_yaml

Examples

Run this code


x <- list(a = 1, b = 2)
f <- tempfile()

save_yaml(x, f)

load_yaml(f)

map <- dipsaus::fastmap2(missing_default = NA)
map$c <- 'lol'
load_yaml(f, map = map)

map$a
map$d


Run the code above in your browser using DataLab