compar {gallery} | R 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
[Package gallery version 1.0.0 Index]