Description Usage Arguments Value
Convert single variable columns to multiple binary columns
1 | binarize_col(data, col = 1:ncol(data), sep = ".", na.value = 0)
|
data |
Data frame. |
col |
Character or numeric. The names or indices of the columns of
|
sep |
Character. The string to connect each variable to its value to create names for the binary columns. |
na.value |
Numeric. Value to assign to NA entries in value-specific columns. (NA entries are converted to 1 in NA columns.) Defaults to 0. |
A data frame having the same number of rows as data
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.