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.

opts

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

### Get the default columns in the variable view mdmcda::opts$get(varViewCols);
#> Error in mdmcda::opts$get(varViewCols): Option 'varViewCols' is not a valid (i.e. existing) option for the `mdmcda` package!!
### Set it to a custom version mdmcda::opts$set(varViewCols = c("values", "level"));
#> Error in mdmcda::opts$set(varViewCols = c("values", "level")): Option 'varViewCols' is/are not a valid (i.e. existing) option for the `mdmcda` package!!
### Check that it worked mdmcda::opts$get(varViewCols);
#> Error in mdmcda::opts$get(varViewCols): Option 'varViewCols' is not a valid (i.e. existing) option for the `mdmcda` package!!
### Reset this option to its default value mdmcda::opts$reset(varViewCols);
#> Error in mdmcda::opts$reset(varViewCols): Option(s) 'varViewCols'' is/are not a valid (i.e. existing) option for the `mdmcda` package!
### Check that the reset worked, too mdmcda::opts$get(varViewCols);
#> Error in mdmcda::opts$get(varViewCols): Option 'varViewCols' is not a valid (i.e. existing) option for the `mdmcda` package!!