inst/doc/AHP-TOPSIS-2N_Example.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(ahptopsis2n)

# define the decision matrix
decision<-matrix(c(1100, 5, 25,
                   850, 3.5, 10,
                   950, 4, 30), ncol=3, byrow=TRUE)

rownames(decision)<- c("A1", "A2", "A3")

#define criteria matrix with pairwise comparison
criteria<-matrix(c(1, 1, 3,
                   1, 1, 5,
                   1/3, 1/5, 1), ncol=3, byrow=TRUE)

# define each criterion objective
minmax<-c("min", "max", "min")

# associate the objects to the function arguments and run the function
ahptopsis2n(decision=decision, criteria=criteria, minmax=minmax)

Try the ahptopsis2n package in your browser

Any scripts or data that you put into this service are public.

ahptopsis2n documentation built on Jan. 31, 2021, 5:05 p.m.