split_bins: split_bins

Description Usage Arguments Value Examples

Description

split_bins is for binning using breaks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
split_bins(
  dat,
  x,
  breaks = NULL,
  bins_no = TRUE,
  as_factor = FALSE,
  labels = NULL,
  use_NA = TRUE,
  char_free = FALSE
)

Arguments

dat

A data.frame with independent variables.

x

The name of an independent variable.

breaks

Breaks for binning.

bins_no

Number the generated bins. Default is TRUE.

as_factor

Whether to convert to factor type.

labels

Labels of bins.

use_NA

Whether to process NAs.

char_free

Logical, if TRUE, characters are not splitted.

Value

A data.frame with Bined x.

Examples

1
2
bins = split_bins(dat = UCICreditCard,
x = "PAY_AMT1", breaks = NULL, bins_no = TRUE)

Example output

Package 'creditmodel' version 1.2.7

creditmodel documentation built on Jan. 7, 2022, 5:06 p.m.