Description Usage Arguments Details Value Missing and non-finite values Author(s) References See Also Examples
Computes the sample means in non-overlapping bins
1 2 |
y |
A |
x |
A |
bx |
A |
na.rm |
If |
count |
If |
right |
If |
... |
Not used. |
binMeans(x, bx, right=TRUE)
gives equivalent results as
rev(binMeans(-x, bx=sort(-bx), right=FALSE))
, but is faster.
Returns a numeric
vector
of length B.
Data points where either of y
and x
is missing are
dropped.
Non-finite values in y
are not allowed and gives an error.
Missing values in bx
are not allowed and gives an error.
Henrik Bengtsson with initial code contributions by Martin Morgan [1].
[1] R-devel thread Fastest non-overlapping binning mean function
out there? on Oct 3, 2012
binCounts
().
aggregate
and mean
().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.