View source: R/neighborsPointPattern.R
neighbors | R Documentation |
Identifies neighbors for each points in a given r distance neighborhood returning the index of neighbor points.
neighbors(x, y, r)
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. |
'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'.
Alexandre Adalardo de Oliveira aleadalardo@gmail.com
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.
## Not run:
neighbors(x = runif(100, 0, 100), y = runif(100, 0, 100), r = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.