nndist_subset: nndist_subset

View source: R/rTEM_02.R

nndist_subsetR Documentation

nndist_subset

Description

Edge corrected nearest neighbor distribution

Usage

nndist_subset(
  pattern,
  pattern2 = NULL,
  window = NULL,
  drop_isolated = FALSE,
  k = 1,
  output = "list"
)

Arguments

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

Details

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.


rolandrolandroland/rTEM documentation built on March 29, 2025, 2:17 p.m.