Transform a Table into an Indicator Matrix

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

1 |

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

`add_names` |
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.

Questions? Problems? Suggestions? Tweet to @rdrrHQ 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.