models2pam {bamm} | R Documentation |
Function to convert binary raster models to a Presence Absences Matrix.
models2pam(mods_stack, sparse = TRUE, parallel = FALSE, ncores = 2)
mods_stack |
A raster stack containing binary models of each species in the community. |
sparse |
Logical. If TRUE the PAM will be returned as a sparse matrix. |
parallel |
Logical. If TRUE computations will be done in parallel |
ncores |
Integer. Number of cores to run the parallel process. |
For more information about PAM see Soberon and Cavner (2015).
A presence-absence matrix (PAM).
Luis Osorio-Olvera & Jorge SoberĂ³n
Soberon J, Cavner J (2015). “Indices of Biodiversity Pattern Based on Presence-Absence Matrices: A GIS Implementation.” Biodiversity Informatics, 10, 22–34..
lagos_path <- system.file("extdata/conejos",
package = "bamm")
enm_path <- list.files(lagos_path,
pattern = ".tif",
full.names = TRUE)[1:10]
en_models <- raster::stack(enm_path) >0.01
pam <- bamm::models2pam(en_models,sparse=FALSE,
parallel=FALSE,ncores=2)
head(pam)