View source: R/community_sim.R
community_sim | R Documentation |
bam
Estimate community dynamics using the bam
framework
community_sim(en_models, ngbs_vect, init_coords, nsteps, parallel, ...)
en_models |
A stack or directory with the ecological niche models for each species in the community. |
ngbs_vect |
A vector |
init_coords |
A data.frame with 3 columns: sp_name, x and y; x is the longitude and y is the latitude of initial disperal points |
nsteps |
Number of iteration steps for the simuation. |
parallel |
TRUE if the simulation should be run in parallel. Default FALSE |
... |
Parameters of the functions of the |
## Not run: lagos_path <- system.file("extdata/conejos", package = "bam") enm_path <- list.files(lagos_path, pattern = ".tif", full.names = TRUE) en_models <- raster::stack(enm_path) ngbs_vect <- sample(1:2,replace = TRUE, size = raster::nlayers(en_models)) init_coords <- read.csv(file.path(lagos_path, "lagos_initit.csv")) nsteps <- 30 sdm_comm <- bam::community_sim(en_models = enm_path, ngbs_vect = ngbs_vect, init_coords = init_coords, nsteps = nsteps, threshold = 0.1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.