im.ref: Create Reference Matrix

View source: R/incidence.R

im.refR 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))


lakhesis documentation built on June 22, 2024, 10:27 a.m.