A convenience function to count the values (optionally log-transformed) falling within given equal-range bins.
binCounts(data, range, nbins, log = FALSE)
A named vector with the counts of values in each bin.
a numeric vector with the data.
the closed data range in which to divide bins, as a two-element numeric vector. Values falling outside range
are discarded.
the number of bins to split the data. Result is guaranteed to have this number of bins, irrespective of data.
whether or not to log-transform data and ranges before binning.
This is just a convenience function to simplify the task of couting data in equal bins.
The same result could be achieved with hist
with the right arguments.
It is mostly used internally by adjustModel
during the approximation on input parameters,
for the computation of objectives.
adjustModel
.