The generic is applicable to factor and to R objects that can be
converted to factor, i.e. logical, integer, or
character. For numeric data a discretization method has to be
used.
A factor is converted to as many logical variables as there are levels
where the value TRUE indicates the presence of a level.
The colnames are made of the concatenation of a variable name and the
level, separated by sep. For matrix and data.frame
variable names are created if necessary.
A value of NA is mapped to FALSE across all levels.