bin_unique: Create Binning Factor and Shift Following Bins

Description Usage Arguments Value

Description

Original name: .binWithEqualValuesMinRec

Usage

1
bin_unique(x, bins, tol = 1e-08)

Arguments

x

Sorted numeric vector to sort into bins

bins

Intended number of bins

tol

Distance between successive values of x that are treated as equal

Value

Integer vector of same length as x, with unique value for each bin. Each bin holds at least floor(length(x) / bins) records, or more if there were values after the bin that were numerically equal to last value of the bin. The actual number of bins might be differnt from argument bins due to numerically equal values and is reported with attribute bins. Because of using floor in bin-width calculation, the last, i.e. bins, of the bins may hold more values.


grahamstewart12/tidyflux documentation built on June 4, 2019, 7:44 a.m.