View source: R/simulate_niche.R
simulate_niche | R Documentation |
Simulates a niche object of class NINA from a former niche or a matrix of environmental coordinates. The function uses ecospat.grid.clim.dyn from ecospat R package to generate the niche object
simulate_niche(
z,
use.whole.env = F,
method = 1,
glob = NULL,
glob1 = glob,
sample.size = nrow(glob) * 0.1,
R = 100
)
z |
m by n matrix indicating the association coefficient (-1 to 1). m are species to be modeled as rows and n interactions as columns |
use.whole.env |
Logical. Sample from the entire environmental space |
method |
NINA EN model object for species group two |
glob |
n by n matrix indicating the competition coefficient between interactions (0 to 1). |
glob1 |
NINA EN model object for species group one |
sample.size |
String indicating whether to perform at a region or a global level. Note that if models have not been estimated at a region level and it is selected it will produce an error |
R |
Numeric value indicating independence from biotic associations. Value must be comprised between 0 and 1. |
It needs either z or glob arguments to run, otherwise will throw an error
niche object class NINA
## Not run:
z <- simulate_niche(glob = cbind(rnorm(100), rnorm(100)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.