ecosumstats: Calculate Summary Statistics

View source: R/Utility_functions.R

ecosumstatsR Documentation

Calculate Summary Statistics

Description

Calculates summary statistics on metacommunities to be used in ABC analyses.

Usage

ecosumstats(y)

ecosumstats2(y)

Arguments

y

Either a metacommunity matrix or a list of metacommunity matrices

Details

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.

Value

Either a vector of summary statistics for a single metacommunity or a dataframe where columns are different summary statistics and rows are metacommunities.

Functions

  • ecosumstats2: Same as ecosumstats but only for single matrices to allow parallelization

Examples

meta <- CommSimABC::rand_meta(20, 30, 500)
ecosumstats(meta)

metas <- replicate(20, rand_meta(20, 30, 500), simplify = FALSE)
ecosumstats(metas)


trevorjwilli/CommSimABCR documentation built on Feb. 4, 2025, 1:22 a.m.