format_target {explore} | R Documentation |
Format target
Description
Formats a target as a 0/1 variable. If target is numeric, 1 = above average.
Usage
format_target(target)
Arguments
target |
Variable as vector |
Value
Formated target
Examples
iris$is_virginica <- ifelse(iris$Species == "virginica", "yes", "no")
iris$target <- format_target(iris$is_virginica)
table(iris$target)
[Package explore version 1.3.1 Index]