im.ref {lakhesis} | R Documentation |
Create an ideal reference matrix of well-seriated values of the same size as the input matrix.
im.ref(obj)
obj |
A matrix of size |
A matrix of size n \times k
with 1s along the diagonal. If n > k
, 1s are placed from cell (i,i)
to (i,i+k-n)
, with 0 in all other cells.
im.ref(matrix(NA, 5, 5))
im.ref(matrix(1, 7, 12))