binCounts | R Documentation |
A convenience function to count the values (optionally log-transformed) falling within given equal-range bins.
binCounts(data, range, nbins, log = FALSE)
data |
a numeric vector with the data. |
range |
the closed data range in which to divide bins, as a two-element numeric vector. Values falling outside |
nbins |
the number of bins to split the data. Result is guaranteed to have this number of bins, irrespective of data. |
log |
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.
A named vector with the counts of values in each bin.
adjustModel
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.