Transform a Table into an Indicator Matrix

Share:

Description

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

Usage

1
tab2ind(tab, sep = "_", add_names = TRUE)

Arguments

tab

A table (i.e. an object which can be converted to an array).

sep

Character specifying the separator string for joining the levels.

add_names

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

Value

An indicator matrix.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.