marktable {spatstat} | R Documentation |
Visit each point in a point pattern, find the neighbouring points, and compile a frequency table of the marks of these neighbour points.
marktable(X, R, exclude=TRUE)
X |
A marked point pattern.
An object of class |
R |
Neighbourhood radius. |
exclude |
Logical. If |
This algorithm visits each point in the point pattern X
,
inspects all the neighbouring points within a radius R
of the current
point, and compiles a frequency table of the marks attached to the
neighbours.
The dataset X
must be a multitype point pattern, that is,
marks(X)
must be a factor
.
The result is a two-dimensional contingency table with one row for
each point in the pattern, and one column for each possible mark
value. The [i,j]
entry in the table gives the number of
neighbours of point i
that have mark j
.
To perform more complicated calculations on the neighbours of every
point, use markstat
or applynbd
.
A contingency table (object of class "table"
) with one row for
each point in X
, and one column for each possible mark value.
Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
markstat
,
applynbd
,
Kcross
,
ppp.object
,
table
data(amacrine) head(marktable(amacrine, 0.1)) head(marktable(amacrine, 0.1, exclude=FALSE))