View source: R/Utility_functions.R
ecosumstats | R Documentation |
Calculates summary statistics on metacommunities to be used in ABC analyses.
ecosumstats(y)
ecosumstats2(y)
y |
Either a metacommunity matrix or a list of metacommunity matrices |
Calculates the mean, median, and standard deviations for shannon diversity index, simpson diversity index, Pielou's evenness, richness, the number of sites occupied for species. It also calculates beta diversity by calculating the mean and sum of squared interpoint distances using pairwise Bray-Curtis dissimilarities (Anderson 2011), and true alpha, beta, and gamma values using Hills numbers for q = 0 through 2 Jost (2006, 2007), These values are calculated using equal weights for all values of q as well as weighted for q = 1. It also calculates the C-score (as well as skew and variance of C-score), checkerboard score, V-ratio. Lastly it calculates the number of embedded absences, Turnover, and Morisitas index following Leibold and Mikkelson (2002).
ecosumstats2() does the same thing but is written for only a single matrix, which allows parallelization through the parallel package.
Either a vector of summary statistics for a single metacommunity or a dataframe where columns are different summary statistics and rows are metacommunities.
ecosumstats2
: Same as ecosumstats but only for single matrices to allow parallelization
meta <- CommSimABC::rand_meta(20, 30, 500)
ecosumstats(meta)
metas <- replicate(20, rand_meta(20, 30, 500), simplify = FALSE)
ecosumstats(metas)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.