Generate TOML
write.Rd
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
.
Examples
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)
#> <Toml>
#> today = 2025-02-20
#>
#> [human]
#> person = "Greg"
#> age = 29.0
#> bday = "1969-07-02"
to_toml(x)
#> [1] "today = 2025-02-20\n\n[human]\nperson = \"Greg\"\nage = 29.0\nbday = \"1969-07-02\"\n"