indi {DiGGer}R Documentation

Form an indicator matrix.

Description

Form the indicator matrix of the supplied argument in vec order. The matrix will have maxt columns if supplied.

Usage

indi(vec1, maxt = NA)

Arguments

vec1

A matrix or vector of integers.

maxt

The number of columns in the answer.

Value

indi(x) produces a zeroed matrix with length(x) rows and 1 in position i,x[i].

Author(s)

Neil Coombes


[Package DiGGer version 1.0.5 Index]