nndist_subset | R Documentation |
Edge corrected nearest neighbor distribution
nndist_subset(
pattern,
pattern2 = NULL,
window = NULL,
drop_isolated = FALSE,
k = 1,
output = "list"
)
pattern |
point pattern of type ppp or pp3 to calculate distances from |
pattern2 |
point pattern of type ppp or pp3 to calculate distances to. If NULL then pattern will be used |
window |
object of class owin (for ppp) or box3 (for pp3). Only points inside the window are used to calculate distances from, but points outside the window are still included as potential neighbors. If NULL then it includes the entire domain of pattern |
drop_isolated |
if TRUE then points that are closer to a boundary than they are to their kth NN will be dropped: their distances are set to NA |
k |
an integer or vector of integers that determines which NN's to calculate |
output |
outputs a list if "list", outputs a matrix otherwise |
This function calculates the distances to the kth nearest neighbors (NN's) for a subset of points, defined as those inside of window. All points are still considered when fiding the NN's.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.