binarize | R Documentation |
Binarizes vectors or columns based on a cut-off into 0 and 1.
binarize(data, cut_off)
data |
A dataset containing only the columns which are to be binarized |
cut_off |
A cutoff used to binarize. Values <= cut-off will be binarized to 0, Values > cut-off will be binarized to 1. |
A dataframe containing the original columns named VN (with N: 1 -> number of columns) and binarized columns named v_binN (with N: 1 -> number of columns).
## Not run:
data_binarized <- binarize(data_test, cut_off = 2)
data_binarized
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.