Learn R Programming

Prize (version 1.2.0)

ahplot: ahplot

Description

Plotting the problem hierarchy, showing the relationships between goal, criteria, and subcriteria.

Usage

ahplot(srcfile, fontsize = 0.5, cradx = 0.07, crady = 0.05, sradx = 0.05, srady = 0.05, cirx = 0.1, ciry = 0.05, gcol = "green", ccol = "yellow", scol = "orange", lcol = "black", dist = 0.05, digit = 3, main = NULL)

Arguments

srcfile
a character matrix, where the first column specifies the hierarchy order. The second and third columns include the ID of decisison elements and ahp weights (optional), respectively (See the example below).
fontsize
the font size of characters.
cradx,crady
the horizontal and vertical radius of the criteria box, respectively.
sradx,srady
the horizontal and vertical radius of the subcriteria box, respectively.
cirx,ciry
the horizontal and vertical radius of the goal
gcol,ccol,scol
the filling color of the goal, criteria, and subcriteria boxes, respectively.
lcol
the line color surrounding the goal, criteria, and subcriteria boxes.
dist
the distance between the weights and the tree edges.
digit
the number of digits after decimal point to be shown on the arrows.
main
a character string as the plot title

Value

An object created by 'diagram'.

Examples

Run this code
mat <- matrix(nrow = 7, ncol = 2, data = NA)
mat[,1] <- c('0', '1','2','3','4','4.1','4.2')
mat[,2] <- c('Prioritization_of_DE_genes','Tumor_expression','Normal_expression',
'Frequency', 'Epitopes', 'Number_of_epitopes', 'Size_of_epitopes')

# plotting a problem hierarchy
ahplot(mat, fontsize = 0.7, cradx = 0.11 ,sradx = 0.12, cirx= 0.18, ciry = 0.07)

# plotting a problem hierarchy with AHP weights shown on the edges of the graph
mat <- cbind(mat, c(1, 0.470, 0.341, 0.117, 0.073, 0.009, 0.064))
ahplot(mat, fontsize = 0.7, cradx = 0.11 ,sradx = 0.12, cirx= 0.18, ciry = 0.07)

Run the code above in your browser using DataLab