vec2ind: Transform a Vector into an Indicator Matrix

Description Usage Arguments Details Value

Description

A helper function for transforming a vector into an indicator matrix.

Usage

1
vec2ind(x, add_names = TRUE)

Arguments

x

A vector (which will be converted to a factor).

add_names

Logical specifying whether to add dimnames to the resulting indicator matrix.

Details

This is essentially the function class.ind from the package MASS.

Value

An indicator matrix.



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

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.