View source: R/AutoBin_Binary.R
autoBin.binary | R Documentation |
Automatically suggest an optimal cutting point for categorizing a quantitative variable before using the CASMI-based functions. This function does binary cutting, that is, to convert the quantitative variable into a categorical variable with two levels/categories.
autoBin.binary(data, index)
data |
data frame (features as columns and observations as rows). An outcome variable is required. The outcome variable (Y) MUST be the last column. |
index |
index or a vector of indices of the quantitative variables that need to be automatically categorized. |
'autoBin.binary()' returns the entire data frame after automatic binary categorization for the selected quantitative variable(s).
## Use the "iris" dataset embedded in R
data("iris")
newData <- autoBin.binary(iris, c(1,2,3,4))
newData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.