View source: R/neighborsPointPattern.R
meanNeighbors | R Documentation |
Calculate mean number of neighbors as a function of distances from each point
meanNeighbors(
x,
y,
xlim = c(0, 1),
ylim = c(0, 1),
rMax = min(c(xlim[2], ylim[2]))/4,
step = rMax/100
)
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. |
rMax |
maximum distance for neighborhood definition. |
step |
increase distance size for neighborhood. |
'meanNeighbors' returns a data frame with two numeric vectors. The first 'r' represents the neighborhood distance definition; 'meanNeighbors' the mean number of neighbors for each 'r' distance. This count uses the torus border correction.
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:
meanNeighbors(x = runif(100, 0, 1), y = runif(100, 0, 1))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.