View source: R/neighborsPointPattern.R
countNeighbors | R Documentation |
Count number of neighbor for each point for a given r distance neighborhood
countNeighbors(x, y, xlim = c(0, 1), ylim = c(0, 1), r = 0.1)
x , y |
Numeric vectors with 'x' and 'y' coordinates in a cartesian space. They must have the same length. |
xlim , ylim |
Numeric vectors with two values defining the 'x' and 'y' axis limit in the cartesian plane. |
r |
dis.tance for neighborhood definition. |
'countNeighbors' returns a integer vector with counts the number of neighbors around each point at the maximum distance 'r'
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:
countNeighbors(x = runif(100, 0, 100), y = runif(100, 0, 100), xlim= c(0,100), ylim = c(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.