Learn R Programming

aglm (version 0.4.1)

executeBinning: Binning the data to given bins.

Description

Binning the data to given bins.

Usage

executeBinning(x_vec, breaks = NULL, nbin.max = 100, method = "freq")

Value

A list with the following fields:

  • labels: An integer vector with same length as x_vec, where labels[i]==k means the i-th element of x_vec is in the k-th bin.

  • breaks: Breaks of bins used for binning.

Arguments

x_vec

The data to be binned.

breaks

A numeric vector representing breaks of bins (If NULL, automatically generated).

nbin.max

The maximum number of bins (used only if breaks=NULL).

method

"freq" for equal frequency binning or "width" for equal width binning (used only if breaks=NULL).

Author

Kenji Kondo