indmat: Create an Indicator Matrix

Description Usage Arguments

View source: R/indmat.R

Description

Creates an indicator matrix from a grouping vector.

Usage

1
indmat(grp.vec, K = length(unique(grp.vec)))

Arguments

grp.vec

Numeric vector giving the group membership.

K

Scalar indicating the number of groups. Defaults to the number of unique elements in grp.vec.


cds documentation built on May 2, 2019, 5:54 a.m.