Description Usage Arguments Value See Also Examples
Covert configuration file from JSON/INI/YAML/TOML to JSON/INI/YAML
1 2 3 4 5 6 | convert.config(
file = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"),
out.file = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"),
convert.to = "ini",
...
)
|
file |
File name of configuration file to read from. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist and JSON/INI/YAML/TOML format only) |
out.file |
Output path of configuration file. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist) |
convert.to |
JSON/INI/YAML |
... |
Arguments for |
Logical indicating whether convert success
fromJSON
JSON file will read by this
read.ini
INI file will read by this
yaml.load_file
YAML file will read by this
1 2 | config.json <- system.file('extdata', 'config.json', package='configr')
config <- convert.config(file=config.json, out.file = sprintf('%s/config.ini', tempdir()))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.