Learn R Programming

betapart (version 1.1-2)

beta.sample: Resampling multiple-site dissimilarity for n sites

Description

Resamples the 3 multiple-site dissimilarities (turnover, nestedness-resultant fraction, and overall beta diversity) for a subset of sites of the original data frame.

Usage

beta.sample(x, index.family="sorensen", sites=10, samples=100)

Arguments

x
data frame, where rows are sites and columns are species
index.family
family of dissimilarity indices, partial match of "sorensen" or "jaccard".
sites
number of sites for which multiple-site dissimilarities will be computed. If not specified, default is all sites.
samples
number of repetitions. If not specified, default is 1.

Value

  • The function returns a list with a dataframe with the resampled 3 multiple-site dissimilarities (turnover fraction, nestedness-resultant fraction and overall dissimilarity; see beta.multi), a vector with the respective means and a vector with the respective standard deviation. For index.family="sorensen":
  • sampled.valuesdataframe containing beta.SIM, beta.SNE and beta.SOR for all samples
  • mean.valuesvector containing the mean values of beta.SIM, beta.SNE and beta.SOR among samples
  • sd.valuesvector containing the sd values of beta.SIM, beta.SNE and beta.SOR among samples
  • For index.family="jaccard":
  • sampled.valuesdataframe containing beta.JTU, beta.JNE and beta.JAC for all samples
  • mean.valuesvector containing the mean values of beta.JTU, beta.JNE and beta.JAC among samples
  • sd.valuesvector containing the sd values of beta.JTU, beta.JNE and beta.JAC among samples

encoding

utf8

References

Baselga, A. 2010. Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography 19:134-143 Baselga, A. 2012. The relationship between species replacement, dissimilarity derived from nestedness, and nestedness. Global Ecology and Biogeography, in press

See Also

beta.multi, beta.sample, beta.temp

Examples

Run this code
# Read the data for Northern and Southern European cerambycids
data(ceram.s)
data(ceram.n)

# Resample 100 times the multiple-site dissimilarities
# for 10 countries.
beta.ceram.s<-beta.sample(ceram.s, index.family="sor", sites=10, samples=100)
beta.ceram.n<-beta.sample(ceram.n, index.family="sor", sites=10, samples=100)

# Plot the distributions of beta.SIM in Southern Europe (red) 
# and Northern Europe (blue)
hist(beta.ceram.s$sampled.values$beta.SIM, breaks=10, col="red", xlim=c(0,1))
hist(beta.ceram.n$sampled.values$beta.SIM, breaks=10, col="blue", add=TRUE)

Run the code above in your browser using DataLab