Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Sim_Community.R

Add clumped (aggregated) positions to a species abundance distribution. Clumping is simulated using a Thomas cluster process, also known as Poisson cluster process (Morlon et al. 2008, Wiegand & Moloney 2014)

1 2 3 4 5 6 7 8 |

`abund_vec` |
Species abundance vector (integer) |

`sigma` |
Mean displacement (along each coordinate axes) of a point from
its mother point (= cluster centre). |

`mother_points` |
Number of mother points (= cluster centres).
If this is a single value, all species have the same number of clusters.
For example |

`cluster_points` |
Mean number of points per cluster. If this is
a single value, species have the same average number of points per cluster.
If this is a vector of the same length as |

`xrange` |
Extent of the community in x-direction (numeric vector of length 2) |

`yrange` |
Extent of the community in y-direction (numeric vector of length 2) |

To generate a Thomas cluster process of a single species this
function uses a C++ re-implementation of the function
`rThomas`

in the package
spatstat.

There is an inherent link between the parameters `abund_vec`

,
`mother_points`

, and `cluster_points`

. For every species the
abundance has to be equal to the number of clusters
(`mother_points`

) times the number of points per cluster
(`cluster_points`

).

*abundance = mother_points * cluster_points*

Accordingly, if one of the parameters is provided, the other one is directly
calculated from the abundance. Values for `mother_points`

override values
for `cluster_points`

. If none of the parameters is specified, it is assumed
that for every species there is a similar number of clusters and of points
per cluster.

*mother_points = cluster_points = √(abundance),*

In this case rare species have few clusters with few points per cluster, while abundant species have many clusters with many points per cluster.

A community object as defined by `community`

.

Felix May

Morlon et al. 2008. A general framework for the distance-decay of similarity in ecological communities. Ecology Letters 11, 904-917.

Wiegand and Moloney 2014. Handbook of Spatial Point-Pattern Analysis in Ecology. CRC Press

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
abund <- c(10,20,50,100)
sim1 <- sim_thomas_coords(abund, sigma = 0.02)
plot(sim1)
# Simulate species "ranges"
sim2 <- sim_thomas_coords(abund, sigma = 0.02, mother_points = 1)
plot(sim2)
# Equal numbers of points per cluster
sim3 <- sim_thomas_coords(abund, sigma = 0.02, cluster_points = 5)
plot(sim3)
# With large sigma the distribution will be essentially random (see Details)
sim4 <- sim_thomas_coords(abund, sigma = 10)
plot(sim4)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.