A helper function for transforming a vector into an indicator matrix.
A vector (which will be converted to a factor).
Logical specifying whether to add dimnames to the resulting indicator matrix.
This is essentially the function
class.ind from the package MASS.
An indicator matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.