Learn R Programming

colorSpec (version 1.6-0)

cs.options: Functions to set and retrieve colorSpec package options

Description

colorSpec has one option. The option is stored in the R global list and is:

colorSpec.stoponerror

For details on what it does see logging.

It can be set using the built-in function base::options(). When R starts up, an option can be set using a call to base::options() in the file Rprofile.site. If colorSpec is later loaded, the value of the option will not be changed. If an option has not been assigned, then it is created with a default value.

The little helper function cs.options() makes setting the options a little easier in a few ways:

  • it automatically prepends the string 'colorSpec.'

  • partial matching of the option name is enabled

  • an error is issued when the option value has the wrong type

Usage

cs.options( ... )

Value

returns a list with all the colorSpec options.

Arguments

...

named arguments are set; unnamed arguments are ignored with a warning. See Examples.

See Also

logging, options

Examples

Run this code
cs.options( stop=TRUE )             # no problems, no warning
cs.options( stop='TRUE' )           # warns that value has the wrong type
cs.options( stop=FALSE, "DEBUG" )   # warns that the 2nd argument has no name

Run the code above in your browser using DataLab