Learn R Programming

FuzzyAHP (version 0.9.5)

pairwiseComparisonMatrix: Function that creates Pairwise Comparions Matrix

Description

This methods construct object '>PairwiseComparisonMatrix based on provided matrix. The matrix needs to be square and reciprocal with the intensity of importance (comparisons). Since the version 0.6.9 the comparsions can be represented as either characters (e.g. "1", "9", "1/9") or numeric (e.g. 1, 9, 1/9) .

Usage

pairwiseComparisonMatrix(matrix)

# S4 method for matrix pairwiseComparisonMatrix(matrix)

Arguments

matrix

A reciprocal square matrix with ones on the main diagonal.

Value

An object of class '>PairwiseComparisonMatrix

See Also

'>PairwiseComparisonMatrix

Examples

Run this code
# NOT RUN {
comparisonMatrixValues = c("1","9","5","1/9","1","1/3","1/5","3","1")
comparisonMatrix = matrix(comparisonMatrixValues, nrow = 3, ncol = 3, byrow = TRUE)
matrix = pairwiseComparisonMatrix(comparisonMatrix)

comparisonMatrixValues = c(1,9,5,1/9,1,1/3,1/5,3,1)
comparisonMatrix = matrix(comparisonMatrixValues, nrow = 3, ncol = 3, byrow = TRUE)
matrix = pairwiseComparisonMatrix(comparisonMatrix)

# }

Run the code above in your browser using DataLab