View source: R/neighborsPointPattern.R
meanNeighborsBi | R Documentation |
Calculate mean number of second level factor points as a function of the distances from the first level factor points.
meanNeighborsBi(
x,
y,
code,
xlim = c(0, 1),
ylim = c(0, 1),
rMax = min(c(xlim[2], ylim[2]))/4,
step = rMax/100,
ways = c("order", "reverse", "both")
)
x , y |
Numeric vectors with 'x' and 'y' coordinates in a cartesian space. They must have the same length. |
code |
factor vector with two levels and same length as 'x' and 'y' |
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. |
ways |
type of bivariate calculation: 'order' uses first levels as target points; 'reverse' uses second level as target points; 'both' calculate the two bivariates means. |
'meanNeighborsBi' returns a data frame with numeric vectors. The first 'r' represents the neighborhood distance definition; 'meanNeighbors_12' 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.