opts {squids} | R Documentation |
Options for the squids package
Description
The squids::opts
object contains three functions to set, get, and reset
options used by the zirconia package. Use squids::opts$set
to set options,
squids::opts$get
to get options, or squids::opts$reset
to reset specific or
all options to their default values.
Usage
opts
Format
An object of class list
of length 4.
Details
It is normally not necessary to get or set squids
options.
The following arguments can be passed:
- ...
For
squids::opts$set
, the dots can be used to specify the options to set, in the formatoption = value
, for example,utteranceMarker = "\n"
. Forsquids::opts$reset
, a list of options to be reset can be passed.- option
For
squids::opts$set
, the name of the option to set.- default
For
squids::opts$get
, the default value to return if the option has not been manually specified.
The following options can be set:
- silent
Whether to be silent or chatty.
- encoding
The default encoding when reading or writing files.
- preventOverwriting
Whether to be prevent overwriting of existing files.
- debug
Sometimes used to display debugging information.
Examples
### Get the default 'silent' setting
squids::opts$get(silent);
### Set it to FALSE (to be chatty)
squids::opts$set(silent = FALSE);
### Check that it worked
squids::opts$get(silent);
### Reset this option to its default value
squids::opts$reset(silent);
### Check that the reset worked, too
squids::opts$get(silent);