Resamples a set of points with x and y coordinates to impose a minimum distance among nearby points.
Usage
thinning(xy, minimum.distance = NULL)
Arguments
- xy
A data frame with columns named "x" and "y" representing geographic coordinates.
- minimum.distance
Numeric, minimum distance to be set between nearby points, in the same units as the coordinates of xy.
Value
A data frame with the same columns as xy with points separated by the defined minimum distance.
Details
Generally used to remove redundant points that could produce pseudo-replication, and to limit sampling bias by disaggregating clusters of points.
See also
thinning_til_n()
Other utilities:
.vif_to_df(),
auc(),
beowulf_cluster(),
objects_size(),
optimization_function(),
prepare_importance_spatial(),
rescale_vector(),
root_mean_squared_error(),
setup_parallel_execution(),
standard_error(),
statistical_mode(),
thinning_til_n()
Examples
data(plants_xy)
y <- thinning(
xy = plants_xy,
minimum.distance = 10
)
if (interactive()) {
plot(
plants_xy[, c("x", "y")],
col = "blue",
pch = 15
)
points(
y[, c("x", "y")],
col = "red",
pch = 15
)
}