neighbors: Identifies neighbors around each point

View source: R/neighborsPointPattern.R

neighborsR Documentation

Identifies neighbors around each point

Description

Identifies neighbors for each points in a given r distance neighborhood returning the index of neighbor points.

Usage

neighbors(x, y, r)

Arguments

x, y

Numeric vectors with 'x' and 'y' coordinates in a cartesian space. They must have the same length.

r

distance that define neighborhood limits.

xlim, ylim

Numeric vectors with two values defining the 'x' and 'y' axis limit in the cartesian plane.

Value

'neighbors' returns a list of integer vector. Each vector include indexs of neighbors around the point at the maximum distance 'r'. Vector position in the list represents the target point position in the vectors 'x' and 'y'.

Author(s)

Alexandre Adalardo de Oliveira aleadalardo@gmail.com

References

Baddeley, A.; Rubak, E; Turner, R. 2016. Spatial Point Patterns: Methodology and Applications with R. CRC Press. Wiegand, T. & Moloney, K.A. 2014. Handbook of Spatial Point-Pattern Analysis in Ecology. CRC Press.

Examples

## Not run: 
neighbors(x = runif(100, 0, 100), y = runif(100, 0, 100), r = 10)

## End(Not run)


adalardo/Rppsp documentation built on June 10, 2025, 1:11 p.m.