target_explore_num: Explore categorical variable + target

View source: R/explore.R

target_explore_numR Documentation

Explore categorical variable + target

Description

Create a plot to explore relation between numerical variable and a binary target

Usage

target_explore_num(
  data,
  var,
  target = "target_ind",
  min_val = NA,
  max_val = NA,
  flip = TRUE,
  title = NA,
  auto_scale = TRUE,
  na = NA,
  legend_position = "bottom"
)

Arguments

data

A dataset

var

Numerical variable

target

Target variable (0/1 or FALSE/TRUE)

min_val

All values < min_val are converted to min_val

max_val

All values > max_val are converted to max_val

flip

Should plot be flipped? (change of x and y)

title

Title of plot

auto_scale

Use 0.02 and 0.98 quantile for min_val and max_val (if min_val and max_val are not defined)

na

Value to replace NA

legend_position

Position of legend ("right"|"bottom"|"non")

Value

Plot object


explore documentation built on Oct. 11, 2023, 9:07 a.m.