sim.spatial {BAT} | R Documentation |

## Simulation of species spatial distributions.

### Description

Creates artificial communities with given SAD and spatial clustering.

### Usage

```
sim.spatial(
n,
s,
sad = "lognormal",
sd = 1,
distribution = "aggregated",
clust = 1
)
```

### Arguments

`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. |

### Details

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.

### Value

A matrix of individuals x (species, x coords and y coords).

### Examples

```
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))
}
```

*BAT*version 2.9.6 Index]