The function converts a data frame into a Binary Data Matrix (A matrix with entries either 0 or 1).
Factors with two levels are directly transformed into a column of 0/1 entries.
Factors with more than two levels are converted into a binary submatrix with
as many rows as x
and as many columns as levels or categories. (Indicator matrix)
Integer Variables are treated as factors
Continuous Variables are converted into binary variables using a cut point that can be
the median, the mean or a value provided by the user.