apply.BORDA | R Documentation |
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).
apply.BORDA(mat, beneficial.vector)
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). |
A numeric vector of total Borda scores for each alternative, in the original row order.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.