distmap(X, ...)
"ppp"
),
or a window (object of class "owin"
).as.mask
to control pixel resolution."im"
) whose grey scale values
are the values of the distance map.f(x)
is defined for any two-dimensional
location $x$ as the shortest distance from $x$ to $A$. This function computes the distance map of the set X
and returns the distance map as a pixel image.
This is generic. Methods are provided for
point patterns (distmap.ppp
)
and windows (distmap.owin
).
distmap.ppp
,
distmap.owin
data(cells)
U <- distmap(cells)
data(letterR)
V <- distmap(letterR)
plot(U)
plot(V)
Run the code above in your browser using DataLab