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)

## S3 method for class 'matrix'
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 April 25, 2026, 5:06 p.m.