opts.Rd
The metabefor::opts
object contains three functions to set, get, and reset
options used by the metabefor package. Use metabefor::opts$set
to set options,
metabefor::opts$get
to get options, or metabefor::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 metabefor
options.
The following arguments can be passed:
For metabefor::opts$set
, the dots can be used to specify the options
to set, in the format option = value
, for example, utteranceMarker = "\n"
. For
metabefor::opts$reset
, a list of options to be reset can be passed.
For metabefor::opts$set
, the name of the option to set.
For metabefor::opts$get
, the default value to return if the
option has not been manually specified.
The following options can be set:
The prefix for quasi-unique record identifiers (QURIDs).
The worksheet names: a named list with four character values
named entities
, valueTemplates
, definitions
, and instructions
.
The entity columns; a named list with character values holding the
names of the columns in the entities
worksheet of the spreadsheet. The
default values are stored in metabefor::opts$get("entityColNames")
- if you
need to override these values, just reproduce that object.
The value template columns; a named list with
character values holding the names of the columns in the entities
worksheet of the spreadsheet. The default values are stored
in metabefor::opts$get("valueTemplateColNames")
- if you need to
override these values, just reproduce that object.
The instructions worksheet columns: a names list with
character values holding the names of the columns in the instructions
worksheet of the spreadsheet. The default values are stored
in metabefor::opts$get("instructionsColNames")
- if you need to
override these values, just reproduce that object.
The definitions worksheet columns: a names list with
character values holding the names of the columns in the definitions
worksheet of the spreadsheet. The default values are stored
in metabefor::opts$get("definitionsColNames")
- if you need to
override these values, just reproduce that object.
Whether to use indentation to visually organise the Rxs template. If TRUE, deeper nesting in the Rxs specification's hierarchy will be visible as deeper indentation.
The number of spaces to use when identing.
The maximum width of the Rxs template in characters.
The character used to signify comments - if this is changed, R will throw errors (unless perhaps it once introduces another comment symbol).
The character used after the first character for filling up space.
The suffix to use for the entity identifiers/names of repeating entities.
### Get the default Quasi-Unique Record Identifier prefix
metabefor::opts$get(quridPrefix);
#> [1] "qurid_"
### Set it to a custom version, so that every line starts with a pipe
metabefor::opts$set(quridPrefix = "QURID_");
### Check that it worked
metabefor::opts$get(quridPrefix);
#> [1] "QURID_"
### Reset this option to its default value
metabefor::opts$reset(quridPrefix);
### Check that the reset worked, too
metabefor::opts$get(quridPrefix);
#> [1] "qurid_"