This algorithm visits each point in the point pattern X
,
determines which points of X
are ``neighbours'' of the current
point, extracts the marks of these neighbouring points,
applies the function fun
to the marks,
and collects the value or values returned by fun
. The definition of ``neighbours'' depends on the arguments
N
and R
, exactly one of which must be given.
If N
is given, then the neighbours of the current
point are the N
points of X
which are closest to
the current point (including the current point itself).
If R
is given, then the neighbourhood of the current point
consists of all points of X
which lie closer than a distance R
from the current point.
Each point of X
is visited; the neighbourhood
of the current point is determined; the marks of these points
are extracted as a vector v
; then the function
fun
is called as:
fun(v, ...)
where ...
are the arguments passed from the call to
markstat
.
The results of each call to fun
are collected and returned
according to the usual rules for apply
and its
relatives. See Value above.
This function is just a convenient wrapper for a common use of the
function applynbd
. For more complex tasks,
see applynbd
.