sim.spatial | R Documentation |
Creates artificial communities with given SAD and spatial clustering.
sim.spatial(
n,
s,
sad = "lognormal",
sd = 1,
distribution = "aggregated",
clust = 1
)
n |
total number of individuals. |
s |
number of species. |
sad |
The SAD distribution type (lognormal, uniform, broken stick or geometric). Default is lognormal. |
sd |
The standard deviation of lognormal distributions. Default is 1. |
distribution |
The spatial distribution of individual species populations (aggregated, random, uniform or gradient). Default is aggregated. |
clust |
The clustering parameter if distribution is either aggregated or gradient (higher values create more clustered populations). Default is 1. |
The spatial distribution of individuals of given species may take a number of forms. Competitive exclusion may cause overdispersion, specific habitat needs or cooperation may cause aggregation and environmental gradients may cause abundance gradients.
A matrix of individuals x (species, x coords and y coords).
par(mfrow = c(3 ,3))
comm = sim.spatial(100, 9, distribution = "uniform")
for(i in 1:9){
sp <- comm[comm[1] == paste("Sp", i, sep = ""), ]
plot(sp$x, sp$y, main = paste("Sp", i), xlim = c(0,1), ylim = c(0,1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.