alt_values {DEXiR}R Documentation

alt_values

Description

Make a list of alternative's values corresponding to attributes.

Usage

alt_values(alt, attributes, as_character = TRUE, round = NULL)

Arguments

alt

data.frame representing a single alternative.

attributes

A vector of DexiAttribute objects.

as_character

⁠logical(1).⁠. Determines whether to represent alternative values numerically ("internal representation") (FALSE) or as character strings (using value_text()) (TRUE).

round

A single integer. An optional argument to value_text().

Value

character(length(attributes)). String representation of alt's values.

See Also

value_text()

Examples

# Load "Car.dxi"
CarDxi <- system.file("extdata", "Car.dxi", package = "DEXiR")
Car <- read_dexi(CarDxi)

unlist(alt_values(Car$alternatives[1,], Car$attributes, as_character = TRUE))
# c("NULL", "exc", "low", "medium", "low", "exc", "high", "more", "4", "big", "high")

[Package DEXiR version 1.0.2 Index]