im.ref {lakhesis}R Documentation

Create Reference Matrix

Description

Create an ideal reference matrix of well-seriated values of the same size as the input matrix.

Usage

im.ref(obj)

Arguments

obj

A matrix of size n \times k.

Value

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.

Examples

im.ref(matrix(NA, 5, 5))
im.ref(matrix(1, 7, 12))


[Package lakhesis version 0.0.1 Index]