calculateEvenlyDistributedBins: Calculate evenly-distributed bins

View source: R/drugSetEnrichment.R

calculateEvenlyDistributedBinsR Documentation

Calculate evenly-distributed bins

Description

Calculate evenly-distributed bins

Usage

calculateEvenlyDistributedBins(
  numbers,
  maxBins = 15,
  k = 5,
  minPoints = NULL,
  ...,
  ids = NULL
)

Arguments

numbers

Numeric

maxBins

Numeric: maximum number of bins for numeric columns

k

Numeric: constant; the higher the constant, the smaller the bin size (check minpts)

minPoints

Numeric: minimum number of points in a bin (if NULL, the minimum number of points is the number of non-missing values divided by maxBins divided by k)

...

Arguments passed on to binr::bins

max.breaks

Used for initial cut. If exact.groups is FALSE, bins are merged until there's no bins with fewer than length(x) / max.breaks points. In bins, one of max.breaks and minpts must be supplied.

exact.groups

if TRUE, the result will have exactly the number of target.bins; if FALSE, the result may contain fewer than target.bins bins

verbose

Indicates verbose output.

errthresh

If the error is below the provided value, stops after the first rough estimate of the bins.

Value

Factor containing the respective group of each element in numbers


nuno-agostinho/cTRAP documentation built on March 28, 2024, 3:59 p.m.