Learn R Programming

DEXiR (version 1.0.2)

evaluate_attributes: evaluate_attributes

Description

Apply evaluate_attribute() for all discrete attributes.

Usage

evaluate_attributes(model, alternative, attributes = NULL, ...)

Value

A list of evaluate_attribute() results for each attribute

Arguments

model

A DexiModel object. Required.

alternative

A data.frame containing a single alternative.

attributes

List of attributes or vector of attribute names, ID's or indices. Default: All basic attributes of model.

...

Optional parameters passed to evaluate_attribute().

See Also

evaluate_attribute()

Examples

Run this code
# 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")
# Perform evaluate_attribute() for all basic attributes of CarDxi
evaluate_attributes(Car, alt)
# Returns a list of evaluate_attribute() results corresponding to all basic attributes,
# indexed by attribute id

Run the code above in your browser using DataLab