format_target: Format target

View source: R/tools.R

format_targetR 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)

explore documentation built on Sept. 11, 2024, 7:40 p.m.