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 19, 2017, 4:49 p.m.

Search within the cds package
Search all R packages, documentation and source code