configoptions
configoptions::configinit
load options into R buildin options.
the order of the options be loaded is determined by the sequence of
cfg argument and the sequence of a directory of yamls being sorted.
the val list has the higest precedence.
c("/etc/config/", "./config", "./config.yml")
if (!require("devtools")) install.packages("devtools")
devtools::install_github("obarisk/configoptions")
require(configoptions)
tryCatch({
getOption("myconf")
}, error=function(e) {
conditionMessage(e)
})
configinit(list(myconf="myconf"))
getOption("myconf")
configinit(cfg=system.file("extdata", "01-example.yml", package="configoptions"))
getOption("config_list")
getOption("config_int")
getOption("config_str")
getOption("myconf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.