configr: configr package

Description See Also Examples

Description

Implements the YAML parser, JSON parser, INI parser and TOML parser for R setting and writing of configuration file.

See Also

Useful links:

https://github.com/Miachol/configr

Report bugs at https://github.com/Miachol/configr/issues

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
example.toml <- system.file('toml', 'example.toml', package='RcppTOML')
is.toml <- is.toml.file(example.toml)
file.type <- get.config.type(example.toml)
toml.list.raw <- read.config(example.toml)
owner.config <- eval.config(file = example.toml, config = 'owner')
owner.config.name <- eval.config(value = 'name', file = example.toml, config = 'owner')
toml.sections <- eval.config.sections(example.toml)
toml.merged.all <- eval.config.merge(example.toml)
toml.merged.selected <- eval.config.merge(example.toml, sections = c('database', 'owner'))

others <- list(others = list(lastupdate='2017-01-07'))
toml.list.update <- config.list.merge(toml.list.raw, others)

configr documentation built on July 17, 2020, 5:07 p.m.