Description Usage Arguments Value See Also Examples
Write config in a file (JSON/YAML/INI)
| 1 2 3 4 5 6 7 | write.config(
  config.dat,
  file.path = Sys.getenv("R_CONFIGFILE_ACTIVE", "config.cfg"),
  write.type = "ini",
  sections = NULL,
  ...
)
 | 
| config.dat | a list of config (eg. generated by read.config) | 
| file.path | File path of configuration to write. Defaults to the value of the 'R_CONFIGFILE_ACTIVE' environment variable ('config.cfg' if the variable does not exist) | 
| write.type | json/ini/yaml | 
| sections | Sections that need be write in file, default is NULL and use all of sections | 
| ... | Arguments for  | 
Logical indicating whether the specified configuration file be writed successful
toJSON convert a list to JSON string, 
prettify convert a JSON string to user friendly view, 
write.ini write a list in a INI format file, 
as.yaml convert a list to YAML format
| 1 2 3 | list.test <- list(a=c(123,456))
out.yaml <- sprintf('%s/test.yaml', tempdir()) 
write.config(list.test, out.yaml, write.type = 'yaml')
 | 
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.