thin
returns spatially thinned species occurence data sets.
A randomizaiton algorithm (thin.algorithm
) is used to create
data set in which all occurnece locations are at least thin.par
distance apart. Spatial thinning helps to reduce the effect of uneven,
or biased, species occurence collections on spatial model outcomes.
thin(
loc.data,
lat.col = "LAT",
long.col = "LONG",
spec.col = "SPEC",
thin.par,
reps,
locs.thinned.list.return = FALSE,
write.files = TRUE,
max.files = 5,
out.dir,
out.base = "thinned_data",
write.log.file = TRUE,
log.file = "spatial_thin_log.txt",
verbose = TRUE
)
A data.frame of occurence locations. It can include several columnns, but must include at minimum a column of latitude values, a column of longitude values, and a column of species names.
Name of column of latitude values. Caps sensitive.
Name of column of longitude values. Caps sensitive.
Name of column of species name. Caps sensitive.
Thinning parameter - the distance (in kilometers) that you want records to be separated by.
The number of times to repete the thinning process. Given the random process of removing nearest-neighbors there should be 'rep' number of different sets of coordinates.
TRUE/FALSE - If true, the `list` of the data.frame of thinned locs resulting from each replication is returned (see Returns below).
TRUE/FALSE - If true, new *.csv files will be written with the thinned locs data
The maximum number of *csv files to be written based on the thinned data
Directory to write new *csv files to
A file basename to give to the thinned datasets created
TRUE/FALSE create/append log file of thinning run
Text log file
TRUE/FALSE - If true, running details of the function are print at the console.
locs.thinned.dfs A list of data.frames, each data.frame the spatially thinned locations of the algorithm for a single replication. This list will have `reps` elements.