View source: R/1.1.f.data.prep.R
| thin_b | R Documentation |
Will use spThin optimisation algorithm to subset the dataset such that all occurrence locations are a minimum distance apart. This process helps reduce the effect of biases in observation records on the predictive performance of ecological niche models.
thin_b(
loc.data.lst = list(),
lat.col = NULL,
long.col = NULL,
spec.col = NULL,
thin.par = 10,
reps = 10,
locs.thinned.list.return = TRUE,
write.files = TRUE,
max.files = 1,
write.log.file = TRUE
)
loc.data.lst |
Named list containing data.frames/SpatialPoints/SpatialPointsDataFrame of species occurence locations. Each data.frame can include several columnns, but must include at minimum a column of latitude and a column of longitude values |
lat.col |
Name of column of latitude values. Caps sensitive. |
long.col |
Name of column of longitude values. Caps sensitive. |
spec.col |
Name of column of species name. Caps sensitive. |
thin.par |
Thinning parameter - the distance (in kilometers) that you want records to be separated by. |
reps |
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. |
locs.thinned.list.return |
TRUE/FALSE - If true, the 'list' of the data.frame of thinned locs resulting from each replication is returned (see Returns below). |
write.files |
TRUE/FALSE - If true, new *.csv files will be written with the thinned locs data |
max.files |
The maximum number of *csv files to be written based on the thinned data |
write.log.file |
TRUE/FALSE create/append log file of thinning run |
Make sure coordinates are in decimal degrees. This function will use great.circle.distance to thin the datasets
Named list containing thinned datasets for each species. See ?thin of spThin package.
thin, load_thin_occ
## Not run:
thinned.dataset.batch <- thin_b(loc.data.lst = spp.occ.list)
plotThin(thinned.dataset.batch[[1]])
length(thinned.dataset.batch[[1]])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.