Load: Load an ahp model from file

Description Usage Arguments Details Value Examples

Description

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

Usage

1
2
3
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.

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").

Value

A data.tree containing the model specification.

Examples

1
2
3
4
5
6
7
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)

gluc/ahp documentation built on May 17, 2019, 6:40 a.m.