The justifier::opts
object contains three functions to set, get, and reset
options used by the escalc package. Use justifier::opts$set
to set options,
justifier::opts$get
to get options, or justifier::opts$reset
to reset specific or
all options to their default values.
Details
If you use justifier to programmatically document your decisions in an
R file, there is one option that you common use: workspace_id
and
workspace_option_name
It is normally not necessary to get or set justifier
options.
The following arguments can be passed:
- ...
For
justifier::opts$set
, the dots can be used to specify the options to set, in the formatoption = value
, for example,EFFECTSIZE_POINTESTIMATE_NAME_IN_DF = "\n"
. Forjustifier::opts$reset
, a list of options to be reset can be passed.- option
For
justifier::opts$set
, the name of the option to set.- default
For
justifier::opts$get
, the default value to return if the option has not been manually specified.
The following options can be set:
- regExReplacements
Default regex replacements when sanitizing for DiagrammeR
- weight_fieldName
When creating the diagram showing the justification for a decision, the name of the field with the weight.
- negWeight_color
When creating the diagram showing the justification for a decision, the colour to use for edges with negative weights
- posWeight_color
When creating the diagram showing the justification for a decision, the colour to use for edges with positive weights
- node_color
When creating the diagram showing the justification for a decision, the color for nodes
- edge_color
When creating the diagram showing the justification for a decision, the color for edges
- penwidth
When creating the diagram showing the justification for a decision, the pen widht
- workspace_id
The default identifier for the workspace (when nothing else is specified)
- workspace
The name of the default workspace
- silent
Whether to be chatty or silent
Examples
### Get the default 'silent' setting
justifier::opts$get('silent');
#> [1] TRUE
### Set to FALSE
justifier::opts$set(silent = FALSE);
### Check that it worked
justifier::opts$get('silent');
#> [1] FALSE
### Reset this option to its default value
justifier::opts$reset('silent');
### Check that the reset worked, too
justifier::opts$get('silent');
#> [1] TRUE