add.config {ProjectTemplate} | R Documentation |
Add project specific config to the global config
Description
Enables project specific configuration to be added to the global config object. The
allowable format is key value pairs which are appended to the end of the config
object, which is accessible from the global environment.
Usage
add.config(..., apply.override = FALSE)
Arguments
... |
A series of key-value pairs containing the configuration. The key is the
name that gets added to the config object. These can be overridden at load
time through the |
apply.override |
A boolean indicating whether overrides should be applied. This
can be used to add a setting disregarding arguments to |
Details
Once defined, the value can be accessed from any ProjectTemplate
script by
referencing config$my_project_var
.
Examples
library('ProjectTemplate')
## Not run:
add.config(
keep_bigdata=TRUE, # Whether to keep the big data file in memory
parse=7 # number of fields to parse
)
if (config$keep_bigdata) ...
## End(Not run)
[Package ProjectTemplate version 0.11.0 Index]