The psyverse::opts object contains three functions to set, get, and reset
options used by the escalc package. Use psyverse::opts$set to set options,
psyverse::opts$get to get options, or psyverse::opts$reset to reset specific or
all options to their default values.
optsAn object of class list of length 4.
It is normally not necessary to get or set psyverse options.
The following arguments can be passed:
For psyverse::opts$set, the dots can be used to specify the options
to set, in the format option = value, for example,
encoding = "UTF-8". For
psyverse::opts$reset, a list of options to be reset can be passed.
For psyverse::opts$set, the name of the option to set.
For psyverse::opts$get, the default value to return if the
option has not been manually specified.
The following options can be set:
The default encoding used to read or write files.
### Get the default encoding
psyverse::opts$get(encoding);
#> [1] "UTF-8"
### Set it to UTF-8-BOM
psyverse::opts$set(encoding = "UTF-8-BOM");
### Check that it worked
psyverse::opts$get(encoding);
#> [1] "UTF-8-BOM"
### Reset this option to its default value
psyverse::opts$reset(encoding);
### Check that the reset worked, too
psyverse::opts$get(encoding);
#> [1] "UTF-8"