RcppTOML (version 0.1.0)

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

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://github.com/toml-lang/toml

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 DataCamp Workspace