Quadrat counting is an elementary technique for analysing spatial
point patterns. See Diggle (2003). If X
is a point pattern, then
by default, the window containing the point pattern X
is divided into
an nx * ny
grid of rectangular tiles or `quadrats'.
(If the window is not a rectangle, then these tiles are intersected
with the window.)
The number of points of X
falling in each quadrat is
counted. These numbers are returned as a contingency table.
If xbreaks
is given, it should be a numeric vector
giving the $x$ coordinates of the quadrat boundaries.
If it is not given, it defaults to a
sequence of nx+1
values equally spaced
over the range of $x$ coordinates in the window Window(X)
.
Similarly if ybreaks
is given, it should be a numeric
vector giving the $y$ coordinates of the quadrat boundaries.
It defaults to a vector of ny+1
values
equally spaced over the range of $y$ coordinates in the window.
The lengths of xbreaks
and ybreaks
may be different.
Alternatively, quadrats of any shape may be used.
The argument tess
can be a tessellation (object of class
"tess"
) whose tiles will serve as the quadrats.
The algorithm counts the number of points of X
falling in each quadrat, and returns these counts as a
contingency table.
The return value is a table
which can be printed neatly.
The return value is also a member of the special class
"quadratcount"
. Plotting the object will display the
quadrats, annotated by their counts. See the examples.
To perform a chi-squared test based on the quadrat counts,
use quadrat.test
.
To calculate an estimate of intensity based on the quadrat counts,
use intensity.quadratcount
.
To extract the quadrats used in a quadratcount
object,
use as.tess
.
If X
is a split point pattern (object of class
"splitppp"
then quadrat counting will be performed on
each of the components point patterns, and the resulting
contingency tables will be returned in a list. This list can be
printed or plotted.
Marks attached to the points are ignored by quadratcount.ppp
.
To obtain a separate contingency table for each type of point
in a multitype point pattern,
first separate the different points using split.ppp
,
then apply quadratcount.splitppp
. See the Examples.