Theory, R functions & Examples
- Sampling design NEW
This dataset was created using the library
neutral.vp, written by Tyler Smith. This library implements the original algorithm for simulation of spatially structured multivariate data, developed by Graham Bell (2000, 2003 and 2005) for simulation of communities assembled by neutral processes. Smith & Lundholm (2010) extended Bell's algorithm by adding niche-based processes (i.e. species dies, reproduce and disperse randomly, but different species have different ecological optima; see their paper for details).
neutral.vp was published as an on-line appendix of Smith & Lundholm (2010); published version contains library source, which needs to be compiled1) (I have done this for the purpose of this study materials - see the link below).
Simulated data represent an artificial landscape with 50 simulated species. The platform for landscape simulation was the topographical map of SW Moravia in the Czech Republic (which is cut through by several deep river valleys in NW to SE direction). The artificial landscape is of size 100×100 pixels, each pixel representing one habitat with a specific value of the environmental variable (here elevation, rescaled to 1-10 scale). Each habitat (pixel) has an upper carrying capacity of 500 individuals, and each habitat is internally homogeneous. At the beginning of the simulation, 500 individuals (the same number for each of 50 species) are assigned to each habitat. Each species has randomly assigned ecological optima (on the scale 1-10), which influences the species survival at the habitat: the more similar is the species optima to the value of the habitat, the higher is the probability that species will produce an offspring (higher birth rate) and lower probability that the species will become extinct at the habitat (lower death rate). The offspring spreads to surrounding habitats by random walk; the higher is the migration speed set up in the model, the further the offspring will get.
The model has two turning knobs - the first knob can regulate the importance of the environment (niche-assembly, i.e., how much is the survival of the species influenced by the difference between species ecological niche and habitat actual ecological conditions), and the second knob modifies the migration speed (dispersal limitation, i.e., how far the offspring can migrate).
The landscape is sampled in a regular fashion (only 144 habitats, separated by lag distance of 8 pixels, are sampled). The species data were created using the library
neutral.vp, the script can be found here.
The information about environmental conditions of individual habitats (pixels) is represented by elevation in topographical map of SW Moravia (100 x 100 pixels).
R library neutral.vp_1.0-0.zip (author: Tyler Smith, published as an appendix to Smith & Lundholm 2010, current version compiled in R 3.1.0; x86_64-w64-mingw32)2). The
neutral.vp library requires installation of additional libraries:
low.disp.spe <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/low-disp-spe.txt') high.disp.spe <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/high-disp-spe.txt') env <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/env-spatial-model.txt') coord <- read.delim ('https://raw.githubusercontent.com/zdealveindy/anadat-r/master/data/coord-spatial-model.txt')
Simulated data of a virtual community, prepared using
neutral.vp library written by T. Smith. The video records the snapshots of the community assembly in the course of time; each pixel is a community (a sample with species). The simulation starts from an even distribution of species among grid cells (means all samples/pixels have exactly the same species composition) and continues by species dispersal among neighboring cells. In each time step, a certain proportion of individuals will reproduce and produce an offspring which will migrate to the adjacent cells. Also, in each time step some individuals will die, to make a space for a newcomer. For the purpose of visualization, the community samples have been classified using k-means clustering into 8 clusters, which are differentiated by color; classification of each time stamp takes into consideration classification of the previous time step of the community, to keep the colorful scheme relevant along the whole assembly time.
What happens: although at the beginning everything is randomly distributed, after some time the community gets spatial structure (patches of different color and different size, which are moving in space in the course of time). Video at the left represents community composed of species with high dispersal ability, which means they can disperse not only to the neighbouring cells, but also further; the video at the right shows a community with species of low dispersal abilities.
packforshould be installed from R-forge using the function
install.packages(“packfor”, repos=“http://R-Forge.R-project.org”). However, it works only for the latest version of R; if you need to install the library to an older R version, you need to compile it by yourself from the source (the *.tar.gz file).