Spatial thinning of occurrence records.

Description

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

Usage

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

Arguments

longlat

Matrix of longitude and latitude (two columns) 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 thres 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 longitude and latitude (two columns) of species occurrence records separated by at least the given distance.

Examples

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