Learn R Programming

RcppTOML (version 0.2.2)

RcppTOML-package: R Access to Parser for TOML (Tom's Obvious Markup Language)

Description

TOML (“Tom's Obvious Markup Language”) is a configuration file grammar for humans. It is easier to read and edit than the alternatives yet arguably more useful as it is stronly types: values come back as integer, double, (multiline-) character (strings), boolean or Datetime. Moreover, complex nesting and arrays are supported as well.

Arguments

Author

Dirk Eddelbuettel put togther the R package. Charles Geigle wrote the cpptoml parser. Tom Preston-Werner is the Tom behind TOML.

Maintainer: Dirk Eddelbuettel <edd@debian.org>

Details

At present, a single parsing function parseTOML (with convenience aliases tomlparse and parseToml) is implemented. It returns a list object corresponding to the configuration from the supplied file.

References

TOML: https://toml.io/en/

Examples

Run this code
  library(RcppTOML)

  file <- system.file("toml", "example.toml", package="RcppTOML")

  toml <- parseTOML(file)  # given file, return parsed object

  summary(toml)            # really sparse summary method
  print(toml)              # print is a wrapper around str()

Run the code above in your browser using DataLab