compar: Create comparison matrix 'A'

View source: R/compar.R

comparR Documentation

Create comparison matrix A

Description

For k=0, if i==j, $A[i,j]=abs(B[i,j])$ and A[i,j]=-abs(B[i,j]) otherwise. For k=1, A replaces each diagonal element of B with its absolute value, and replaces each off-diagonal with the negative of the largest absolute value off-diagonal in the same row.

Usage

compar(B, k = 0)

Arguments

B

input matrix

k

decides what matrix to return

Value

Comparison matrix


gallery documentation built on Sept. 26, 2024, 5:07 p.m.