scale_alternatives {DEXiR} | R Documentation |
scale_alternatives
Description
A helper function for preparing alternatives' data for charts that involve multiple
attributes (such as plotalt_parallel()
) and plotalt_radar()
).
scale_alternatives()
carries out three main operations:
Aggregates DEXi values, represented by sets and distributions, into single numeric values, using one of the
aggregate
operators:"minmax"
,"min"
,"max"
or"mean"
,scales the aggregated values to the
[0,1]
interval so that they can be drawn uniformly on multiple chart axes,optionally "shifts" the values by a small amount to avoid overlapping chart lines.
Usage
scale_alternatives(
model,
alternatives = NULL,
attids = NULL,
aggregate = c("minmax", "min", "max", "mean", "none"),
name = "name",
shift = 0.01
)
Arguments
model |
A DexiModel object. Required. |
alternatives |
A |
attids |
|
aggregate |
Determines how to aggregate DEXi values that are represented/interpreted
as sets in
Any distributions that appear in |
name |
|
shift |
|
Value
A list containing the elements:
data
A data frame containing the aggregated/scaled/shifted numeric values.
nalt
The number of alternatives. Notice that with
aggregate = "minmax"
,data
contains twice as many rows.groups
A numeric vector mapping
data
rows toalternatives
' indices.altnames
Names of alternatives.
See Also
plotalt_parallel()
), plotalt_radar()
)