Learn R Programming

tomledit (version 0.1.0)

write_toml: Generate TOML

Description

Write a Toml object to a file or to a string. Use write_toml() to write to a file on disk. Or, use to_toml() to create a string containing TOML.

Usage

write_toml(x, file)

to_toml(x)

Value

write_toml() returns a Toml object invisibly. to_toml() returns a string.

Arguments

x

an object of class Toml.

file

path to the file to write.

Examples

Run this code
tmp <- tempfile(fileext = ".toml")

x <- toml(
  today = Sys.Date(),
  human = list(person = "Greg", age = 29, bday = "1969-07-02"),
)

write_toml(x, tmp)
read_toml(tmp)
to_toml(x)

Run the code above in your browser using DataLab