The comma::opts object contains three functions to set, get, and reset options used by the comma package. Use comma::opts$set to set options, comma::opts$get to get options, or comma::opts$reset to reset specific or all options to their default values.

opts

Format

An object of class list of length 4.

Details

It is normally not necessary to get or set comma options.

The following arguments can be passed:

...

For comma::opts$set, the dots can be used to specify the options to set, in the format option = value, for example, utteranceMarker = "\n". For comma::opts$reset, a list of options to be reset can be passed.

option

For comma::opts$set, the name of the option to set.

default

For comma::opts$get, the default value to return if the option has not been manually specified.

The following options can be set:

quridPrefix

The prefix for quasi-unique record identifiers (QURIDs).

Two

Second item

Examples

### Get the default "silence versus chattiness" setting
comma::opts$get(silent);
#> [1] TRUE

### Set it to show all messages
comma::opts$set(silent = FALSE);

### Check that it worked
comma::opts$get(silent);
#> [1] FALSE

### Reset this option to its default value
comma::opts$reset(silent);

### Check that the reset worked, too
comma::opts$get(silent);
#> [1] TRUE