qbin {qbinplots}R Documentation

Bin a data.frame into quantile bins

Description

Bins a data.frame into quantile bins for variable x in data.

Usage

qbin(data, x = NULL, n = 100, min_bin_size = NULL, overlap = NULL, ...)

Arguments

data

a data.frame to be binned

x

character variable name used for the quantile binning

n

integer number of quantile bins.

min_bin_size

integer minimum number of rows/data points that should be in a quantile bin. If NULL it is initially sqrt(nrow(data))

overlap

logical if TRUE the quantile bins will overlap. Default value will be FALSE.

...

reserved for future use

Details

Each numeric variable in the data.frame is binned into n quantile bins, for which the fivenum() and mean() is calculated.

When n/nrow(data) is less than min_bin_size, qbin gives a warning and n is adjusted to nrow(data)/min_bin_size. Each categorical variable is binned into n quantile bins, for which the level frequency is calculated.

Value

a qbin object with:


[Package qbinplots version 0.3.3 Index]