binApply2D | R Documentation |
The function FUN
is applied to f
in bins specified by
xbreaks
and ybreaks
.
binApply2D(x, y, f, xbreaks, ybreaks, FUN, include.lowest = FALSE, ...)
x |
a vector of numerical values. |
y |
a vector of numerical values. |
f |
a vector of data to which |
xbreaks |
values of |
ybreaks |
as |
FUN |
function that is applied to the |
include.lowest |
logical value indicating whether to include
|
... |
optional arguments to pass to |
The division into bins is done with cut()
, to which include.lowest
is passed. By default, the x
bins are open at the left and closed
on the right, and the y
bins are open at the bottom and closed
at the top. However, if include.lowest
is TRUE, then those
boundary points are included in the calculation.
A list with the following elements:
xbreaks
and ybreaks
as used, mid-points
xmids
and ymids
, and result
, a matrix containing the
result of applying FUN()
to the f
values
in the designated bins.
Dan Kelley
Other bin-related functions:
binApply1D()
,
binAverage()
,
binCount1D()
,
binCount2D()
,
binMean1D()
,
binMean2D()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.