View source: R/sample_pseudoabsences.R
sample_pseudoabsences | R Documentation |
Samples pseudo-absences from a environmental extent based on euclidean distances to the observations in a environmental PCA
sample_pseudoabsences(
Obs,
predictors,
spsNames = NULL,
th = 0.95,
ras = NULL,
res = NULL,
plot = F
)
Obs |
a n x 3 data.frame class object indicating longitud, latitud and species in the three first columns |
predictors |
a n x m data.frame class object indicating longitud, latitud and species in the two first columns. The rest of the columns must be the environmental variables from which the PCA will be computed. Alternatively a raster stack with environmental variables or a dudi.pca object. If dudi.pca, res argument must be provided, otherwhise it will be set to 1. |
spsNames |
a string vector with selected species names to subset Obs. Default NULL will select all species present in the third column of paramteter Obs |
th |
a numeric threshold to estimate pseudo-absence distances from observations environmental centroid. Default is 0.95 |
ras |
raster or stacked raster with the ecological contrains that will weight pseudo-absence probabilities. Default NULL |
res |
resolution of the environmental grid. Default NULL means that will be computed automatically. |
plot |
Boolean to indicate if computed distances is to be plotted |
Returns an error if filename
does not exist.
List
## Not run:
EN = EN_model(env_data, occ_data1, cluster = "env", n.clus = 5)
PseudoA <- sample_pseudoabsences(EN)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.