add.config: Add project specific config to the global config

Description Usage Arguments Details Examples

Description

Enables project specific configuation 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

1

Arguments

...

A series of key-value pairs containing the configuration. The key is the name that gets added to the config object.

Details

Once defined, the value can be accessed from any ProjectTemplate script by referencing config$my_project_var.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

KentonWhite/rsangole-201-rstudio documentation built on May 24, 2019, 2:33 p.m.