binning: Perform binning over numeric data

Description Usage Arguments Details Value Author(s) References

View source: R/binning.R

Description

Perform binning.

Usage

1
2
binning(x, bins=4, method=c("quantile", "wtd.quantile", "kmeans"),
                     labels=NULL, ordered=TRUE, weights=NULL)

Arguments

x

the numeric data to bin.

bins

the number of bins to use.

method

whether to use "quantile", weighted quantile "wtd.quantile" or "kmeans" binning.

labels

the labels or names to use for each of the bins.

ordered

whether to build an ordered factor or not.

weights

vector of numeric weights for each observation for weighted quantile binning.

Details

Bin the provided nmeric data into the specified number of bins using one of the supported methods. The bins will have the names specified by labels, if supplied. The result can optionally be an ordered factor.

Value

A factor is returned.

Author(s)

Daniele Medri and Graham Williams

References

Package home page: http://rattle.togaware.com


rattle documentation built on Sept. 5, 2017, 9:05 a.m.