| yaml_read | R Documentation |
yaml_read() reads one YAML document from a file; yaml_read_all() reads a
stream. yaml_write() and yaml_write_all() are their counterparts.
yaml_read(path, ...)
yaml_read_all(path, ...)
yaml_write(x, path, ...)
yaml_write_all(x, path, ...)
path |
Path to a file. |
... |
Passed to |
x |
An R object. |
These work on bytes, not text: files are read and written with readBin()
and writeBin(), so nothing depends on the session's locale, and the file
path is carried into parse errors to make them locatable.
yaml_read() returns an R object and yaml_read_all() a list of
them. The writers return path invisibly.
path <- tempfile(fileext = ".yml")
yaml_write(list(host = "localhost", port = 8080L), path)
yaml_read(path)
unlink(path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.