mutate_dicotomize: Create a dicotomized x column based on first rpart split

View source: R/mutate.R

mutate_dicotomizeR Documentation

Create a dicotomized x column based on first rpart split

Description

Create a dicotomized x column based on first rpart split

Usage

mutate_dicotomize(.data, x, y)

Arguments

.data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr)

x

name of predictor to dicotomize

y

name of response to base dicotomization on

Value

.data with a new factor representing the optimal split

See Also

rpart

Examples

mutate_dicotomize(iris, Sepal.Length, Sepal.Width)


the-mad-statter/washu documentation built on May 5, 2024, 10:26 a.m.