census | R Documentation |
Returns a summary of census data from a sim object, optionally the raw census, the total abundance of all individuals in each cell, or the species richness in each cell. By default, returns the last snapshot.
census(sim, snap = length(sim$snaps), type = "census")
sim |
An object of class sim |
snap |
Either an integer specifying the index of the snapshot to extract, or the character name of the snapshot. i.e., “500” returns the snapshot corresponding to the 500th timestep (if it exists). |
type |
One of “census”, “richness”, “abundance”, specifying which summary value is desired. |
Pretty much as described above.
For type == “census”, returns a matrix with one row for every grid cell, and one column for every species, with individual matrix element [i,j] containing the abundance of species j in cell i. The census order is the same as the order of the ‘coords’ element in the sim object, for use in rda or variation partitioning.
For type == “abundance”, returns a square matrix of dimension M x M, with each matrix element ij containing the total abundance of individuals in grid cell ij. Suitable for passing to image(), contour() or related functions for display.
For type == “richness”, returns a square matrix of dimension M x M, with each matrix element ij containing the species richness of grid cell ij. Suitable for passing to image(), contour() or related functions for display.
Tyler Smith
neut.simulate
, sim.cut
## See examples in \code{\link{neut.simulate}}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.