Writes yamlet to file. Similar to io_yamlet.yamlet
but returns invisible storage format instead of invisible storage location.
Arguments
- x
something that can be coerced to class 'yamlet', like a yamlet object or a decorated data.frame
- con
passed to
writeLines- eol
end-of-line; passed to
writeLinesassep- useBytes
passed to
writeLines- default_keys
character: default keys for the first n anonymous members of each element
- fileEncoding
if
conis character, passed tofileasencoding- block
whether to write block scalars
- ...
passed to
as_yamletand toas.character.yamlet
See also
Other interface:
canonical.decorated(),
classified.data.frame(),
decorate.character(),
decorate.data.frame(),
desolve.decorated(),
enscript.decorated(),
ggplot.decorated(),
io_csv.character(),
io_csv.data.frame(),
io_res.character(),
io_res.decorated(),
io_table.character(),
io_table.data.frame(),
io_yamlet.character(),
io_yamlet.data.frame(),
is_parseable.default(),
mimic.default(),
modify.default(),
promote.list(),
read_yamlet(),
resolve.decorated(),
selected.default()
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)
identical(x, decorate(file))
#> [1] TRUE
tmp <- tempfile()
write_yamlet(x, tmp)
stopifnot(identical(read_yamlet(meta), read_yamlet(tmp)))