binCount2D | R Documentation |
Count the number of elements of a given matrix z=z(x,y) that fall within successive pairs of breaks in x and y.
binCount2D(x, y, xbreaks, ybreaks, flatten = FALSE, include.lowest = FALSE)
x , y |
vectors of numerical values. |
xbreaks , ybreaks |
vector of values of |
flatten |
A logical value indicating whether
the return value also contains equilength
vectors |
include.lowest |
logical value indicating whether to include
points where |
By default, the sub-intervals defined by xbreaks
and ybreaks
are open on the left/bottom and closed on the right/top, to match
the behaviour of cut()
. An open interval does not include
points on the boundary, and so any x
and y
values that equal
xbreaks[1]
or ybreaks[1]
will not be counted. To include
such points in the calculation, set include.lowest
to TRUE.
A list with the following elements: the breaks (xbreaks
and ybreaks
), the midpoints (xmids
and ymids
)
between those breaks, and
the count (number
) of f
values in the boxes defined
between successive breaks.
Dan Kelley
Other bin-related functions:
binApply1D()
,
binApply2D()
,
binAverage()
,
binCount1D()
,
binMean1D()
,
binMean2D()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.