ahmatrix {Prize} | R Documentation |
Converting a triangular matrix into a square pairwise comparison matrix (PCM) where the diagonal values are equal to 1 and a[i,j] = 1/a[j,i].
ahmatrix(x)
x |
a numeric triangular matrix, where empty elements are specified with NA. |
An S4 object including a PCM.
Daryanaz Dargahi
mat <- matrix(nrow = 3, ncol = 3, data = NA) mat[1,2] <- 5 mat[1,3] <- 2 mat[2,3] <- 7 res <- ahmatrix(mat)