Skip to main content
Skip table of contents

computeBins

Compute bins values, middles, and data repartition over bins. Available options are:

"criteria"(character)Bins criteria: "equalwidth", "equalsize" or "leastsquare" (default).
"useFixedNb"(logical)TRUE to fix the number of bins, FALSE (default) to estimate it.
"fixedNb"(integer)Fixed number of bins (default: 10).
"estimatedNb"(pair)Bounds for bins number estimation (default: [5,30]).
"nbBinData"(pair)Minimum and maximum number of data per bin for bins number estimation (default: [10,200]).

Usage

R
computeBins(data, options = list())

Arguments

data

(vector) Input data.

options

(list) [optional] Computation options.

Value

A list bins values ("values"), middles ("middles") and the actual number of data per bin ("repartition").

Examples

R
if (FALSE) {
computeBins(data = c(1, 1.25, 2.5, 5, 5.5, 5.75, 7.5, 15, 16.5), options = list(nbBinData = c(1,10)))
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.