ahp (version 0.2.12)

Load: Load an ahp model from file

Description

ahp files are in YAML format, and they are self-contained, fully specified ahp problems. They contain two sections: alternatives and goal.

Usage

Load(ahpFile)

LoadString(ahpString)

Arguments

ahpFile

The full path to the file to be loaded, or a connection.

ahpString

A character string to be loaded.

Value

A data.tree containing the model specification.

Details

The alternatives section contains a list of alternatives, where each alternative may have a number of attributes.

The goal section is a tree of criteria, each criteria having a name, a preferences attribute, and possible child criteria or alternatives.

To look at a sample file, type, see examples below or type vignette("examples", package = "ahp"). To learn the details about the ahp file format, type vignette("file-format", package = "ahp").

Examples

# NOT RUN {
ahpFile <- system.file("extdata", "car.ahp", package="ahp")

#look at a sample file
cat(readChar(ahpFile, file.info(ahpFile)$size))

#load the file into R
carAhp <- Load(ahpFile)

# }