apply.BORDA: Function to apply BORDA method to data

View source: R/BORDA.R

apply.BORDAR Documentation

Function to apply BORDA method to data

Description

This function implements a simple Borda count approach for a decision matrix. It computes a rank for each criterion and then sums these ranks for each alternative. By specifying which columns are beneficial (i.e., higher values preferred), it automatically treats the remaining columns as non-beneficial (i.e., lower values preferred).

Usage

apply.BORDA(mat, beneficial.vector)

Arguments

mat

A numeric matrix or data frame. Rows represent alternatives, columns represent criteria.

beneficial.vector

An integer vector containing the column indices of criteria that are beneficial (profit). All other columns are treated as non-beneficial (cost).

Value

A numeric vector of total Borda scores for each alternative, in the original row order.

Examples

# Create a small decision matrix (4 alternatives x 3 criteria)
mat <- matrix(c(
  5, 9, 2,
  7, 3, 8,
  6, 5, 4,
  4, 7, 9
), nrow = 4, byrow = TRUE)

beneficial.vector <- c(1, 3)


borda_scores <- apply.BORDA(mat, beneficial.vector)
borda_scores

RMCDA documentation built on June 8, 2025, 11:14 a.m.