thin: Spatial thinning of occurrence records.

View source: R/main.R

thinR Documentation

Spatial thinning of occurrence records.

Description

Thinning of records with minimum distances either absolute or relative to the species range.

Usage

thin(longlat, distance = 0.01, relative = TRUE, runs = 100)

Arguments

longlat

Matrix of longitude and latitude or eastness and northness (two columns in this order) of species occurrence records.

distance

Distance either in relative terms (proportion of maximum distance between any two records) or in raster units.

relative

If TRUE, represents the proportion of maximum distance between any two records. If FALSE, is in raster units.

runs

Number of runs

Details

Clumped distribution records due to ease of accessibility of sites, emphasis of sampling on certain areas in the past, etc. may bias species distribution models. The algorithm used here eliminates records closer than a given distance to any other record. The choice of records to eliminate is random, so a number of runs are made and the one keeping more of the original records is chosen.

Value

A matrix of species occurrence records separated by at least the given distance.

Examples

records <- matrix(sample(100), ncol = 2)
par(mfrow=c(1,2))
graphics::plot(records)
records <- thin(records, 0.1)
graphics::plot(records)

red documentation built on Sept. 9, 2023, 1:07 a.m.

Related to thin in red...