The limonaid::opts
object contains three functions to set, get, and reset
options used by the escalc package. Use limonaid::opts$set
to set options,
limonaid::opts$get
to get options, or limonaid::opts$reset
to reset specific or
all options to their default values.
opts
An object of class list
of length 4.
It is normally not necessary to get or set limonaid
options.
The following arguments can be passed:
For limonaid::opts$set
, the dots can be used to specify the options
to set, in the format option = value
, for example,
silent = FALSE
. For
limonaid::opts$reset
, a list of options to be reset can be passed.
For limonaid::opts$set
, the name of the option to set.
For limonaid::opts$get
, the default value to return if the
option has not been manually specified.
The following options can be set:
Whether to be chatty or silent.
The encoding to use when writing files.
The name of the column with the missing values.
### Get the default silent setting
limonaid::opts$get('silent');
#> [1] TRUE
### Set it to FALSE
limonaid::opts$set(silent = FALSE);
### Check that it worked
limonaid::opts$get('silent');
#> [1] FALSE
### Reset this option to its default value
limonaid::opts$reset('silent');
### Check that the reset worked, too
limonaid::opts$get('silent');
#> [1] TRUE