isolation | R Documentation |
Measures of isolation and mean isolation to a set of points in
space. isolation()
creates random points in a landscape and calculates
the nearest neighbor distance from each of them to another set
of points passed as input, x
. mean_isolation()
calculates the
average isolation calculated through isolation()
.
isolation(x, n_rand = 100, ext = c(0, 1, 0, 1), lonlat = FALSE)
mean_isolation(x, n_rand = 100, ext = c(0, 1, 0, 1), lonlat = FALSE)
x |
|
n_rand |
|
ext |
|
lonlat |
|
So far the function only works for a square landscape. In the future we can implement that for polygons or rasters with masks or null cells if necessary, in an approach similar to set_points_sample.
isolation()
returns the distance from each random point to
the nearest neighbor point in x
. mean_isolation()
returns the average
nearest neighbor distance from all random positions to the points in
x
.
pts <- set_points(n_features = 100, method = "random", centers = 1, width = 0.1)[[1]]
isolation(pts)
mean_isolation(pts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.