Converts the calculated AHP tree into a data.frame
or an HTML table, containing all the weight contributions or
priorities to/of the overall decision. You can also sort and filter the output.
Displays the AHP analysis in form of an html table, with gradient colors and nicely formatted.
Analyze(ahpTree, decisionMaker = "Total", variable = c("weightContribution",
"priority", "score"), sort = c("priority", "totalPriority", "orig"),
pruneFun = function(node, decisionMaker) TRUE)AnalyzeTable(ahpTree, decisionMaker = "Total",
variable = c("weightContribution", "priority", "score"),
sort = c("priority", "totalPriority", "orig"), pruneFun = function(node,
decisionMaker) TRUE, weightColor = "honeydew3",
consistencyColor = "wheat2", alternativeColor = "thistle4")
PruneByCutoff(node, decisionMaker, minWeight = 0)
PruneLevels(node, decisionMaker, levelsToPrune = 0)
the calculated AHP data.tree
the name of the decision maker. The default returns the joint decision.
the variable to display, i.e. either weightContribution (the default), priority, or score
sort either by priority according to the decision maker (the default), by totalPriority, or as originally specified (orig)
use this to filter the what rows are shown in the analysis
pruneFun
must be a function taking a Node
as its first argument, and the decisionMaker
as its second
argument. The default (NULL
) returns the full AHP tree
The name of the color to be used to emphasize weights of categories. See color
for a list of possible colors.
The name of the color to be used to highlight bad consistency
The name of the color used to highlight big contributors to alternative choices.
the Node
prunes the nodes whose weightContribution is smaller than the minWeight
cuts the n
hightest levels of the ahp tree
Analyze returns a data.frame
containing the contribution of each criteria
AnalyzeTable returns a formattable
data.frame object which, in most environments, will be displayed as an HTML table
the Prune methods must return TRUE
for nodes to be kept, FALSE
for nodes to be pruned
# NOT RUN {
ahpFile <- system.file("extdata", "car.ahp", package="ahp")
carAhp <- Load(ahpFile)
Calculate(carAhp)
Analyze(
carAhp,
pruneFun = function(x, decisionMaker) {
PruneLevels(x, decisionMaker, 1) && PruneByCutoff(x, decisionMaker, minWeight = 0.05)
}
)
ahpFile <- system.file("extdata", "vacation.ahp", package="ahp")
vacationAhp <- Load(ahpFile)
Calculate(vacationAhp)
AnalyzeTable(
vacationAhp,
decisionMaker = "Kid",
variable = "score",
sort = "totalPriority"
)
# }
Run the code above in your browser using DataLab