opts: Options for the mdmcda package

Description Usage Format Details Examples

Description

The 'mdmcda::opts' object contains three functions to set, get, and reset options used by the dmcda package. Use 'mdmcda::opts$set' to set options, 'mdmcda::opts$get' to get options, or 'mdmcda::opts$reset' to reset specific or all options to their default values.

Usage

1

Format

An object of class list of length 5.

Details

It is normally not necessary to get or set 'mdmcda' options.

The following arguments can be passed:

...

For 'mdmcda::opts$set', the dots can be used to specify the options to set, in the format 'option = value', for example, 'varViewCols = c("values", "level")'. For 'mdmcda::opts$reset', a list of options to be reset can be passed.

option

For 'mdmcda::opts$set', the name of the option to set.

default

For 'mdmcda::opts$get', the default value to return if the option has not been manually specified.

The following options can be set:

decisionId_col

The default column name for the decision identifier

decisionLabel_col

The default column name for the decision label

criterionId_col

The default column name for the criterion identifier

criterionLabel_col

The default column name for the criterion label

criterionDescription_col

The default column name for the criterion description

parentCriterionId_col

The default column name for the parent criterion identifier

alternativeValue_col

The default column name for the alternaive value

alternativeLabel_col

The default column name for the alternative label

scenarioId_col

The default column name for the scenario identifier

scenarioLabel_col

The default column name for the scenario label

decisionDescription_col

The default column name for the decision description

decisionAlternatives_col

The default column name for the label combining a decision and the selected alternative

weightProfileId_col

The default column name for the decision identifier

score_col

The column with the scores returned by 'scenario_scores'

leafCriterion_col

The name of the column name indicating whether a criterion is a leaf (without children) or not

rootCriterionId

The name of the root criterion in the criaria tree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
### Get the default columns in the variable view
mdmcda::opts$get(varViewCols);

### Set it to a custom version
mdmcda::opts$set(varViewCols = c("values", "level"));

### Check that it worked
mdmcda::opts$get(varViewCols);

### Reset this option to its default value
mdmcda::opts$reset(varViewCols);

### Check that the reset worked, too
mdmcda::opts$get(varViewCols);

Matherion/mdmcda documentation built on Dec. 31, 2020, 3:13 p.m.