| parseTOML {RcppTOML} | R Documentation |
The parseTOML function parses ‘TOML’ (for ‘Tom's
Obvious Markup Language’) files. The TOML format both highly
readable and expressive, allows comments, indentation and other
aspects suitable for human readers, contains typed objects yet
allows everything similar configuration languages permit.
parseTOML(input, verbose = FALSE, fromFile=TRUE) ## S3 method for class 'toml' print(x, ...) ## S3 method for class 'toml' summary(object, ...)
input |
A character object either denoting a path and file (where tilde-expansion is performed as well) from parsing from file, or a containing a suitable ‘TOML’ expression that is parsed from this expression. |
verbose |
A logical switch to turn on (very) verbose operation which can be useful in debugging a parsing issue in a file. |
fromFile |
A logical switch indicating whether |
x |
A toml object. |
object |
A toml object. |
... |
Furter arguments. |
The package uses the ‘cpptoml’ C++11 parser by Charles Geigle. This requires a recent-enough C++11 compiler which excludes one deployed by Rtools on Windows at the time the package was initially put together.
A toml object is returned, which is really just a list object
with a class attribute to allow for print and summary methods.
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>
TOML: https://github.com/toml-lang/toml cpptoml: https://github.com/skystrife/cpptoml
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()