opts {psyverse} | R Documentation |
Options for the psyverse package
Description
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.
Usage
opts
Format
An object of class list
of length 4.
Details
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 formatoption = value
, for example,encoding = "UTF-8"
. Forpsyverse::opts$reset
, a list of options to be reset can be passed.- option
For
psyverse::opts$set
, the name of the option to set.- default
For
psyverse::opts$get
, the default value to return if the option has not been manually specified.
The following options can be set:
- encoding
The default encoding used to read or write files.
Examples
### Get the default encoding
psyverse::opts$get(encoding);
### Set it to UTF-8-BOM
psyverse::opts$set(encoding = "UTF-8-BOM");
### Check that it worked
psyverse::opts$get(encoding);
### Reset this option to its default value
psyverse::opts$reset(encoding);
### Check that the reset worked, too
psyverse::opts$get(encoding);