evaluate_attribute {DEXiR} | R Documentation |
Evaluate alternative
for a sequence of attribute
values.
evaluate_attribute(model, attribute, alternative, seq = NULL, ...)
model |
A DexiModel. |
attribute |
A DexiAttribute with an assigned discrete or continuous scale. |
alternative |
A |
seq |
A sequence of |
... |
Optional parameters passed to |
A list of evaluated alternatives for consecutive attribute
values from seq
.
# Load "Car.dxi"
CarDxi <- system.file("extdata", "Car.dxi", package = "DEXiR")
Car <- read_dexi(CarDxi)
alt <- Car$alternative("MyCar",
BUY.PRICE="low", MAINT.PRICE=2, X.PERS="more", X.DOORS="4", LUGGAGE=2, SAFETY="medium")
safety <- Car$attrib("SAFETY")
# Evaluate alt for all values of att
evaluate_attribute(Car, safety, alt)
# Returns a list of three alternatives for values SAFETY=c("small", "medium", "high")