Learn R Programming

spacodiR (version 0.13.0115)

spacodi.calc: measuring spatial and phylogenetic structuring of diversity in communities

Description

Considering species-, phylogenetic-, or trait-diversities, this function measures diversity structuring of community samples.

Usage

spacodi.calc(sp.plot, phy = NULL, sp.traits = NULL, all.together = TRUE, prune = TRUE, pairwise = FALSE, ...)

Arguments

sp.plot
a community dataset in spacodiR format (see as.spacodi)
phy
a phylogenetic tree of class phylo or evolutionary distance matrix between species (see cophenetic.phylo)
sp.traits
a species-by-trait(s) dataframe or a species traits distance matrix (see dist)
all.together
Boolean; whether to treat all traits together or separately
prune
Boolean; whether to dynamically prune datasets if mismatches occur
pairwise
Boolean; whether to return pairwise diversity measures amongst all plots
...
additional arguments to be passed to match.spacodi.data

Value

  • A named list of at least one element (Ist) is returned. The size of the returned list is wholly dependent upon given arguments. SPECIES DIVERSITY STRUCTURING
    • Ist: a measure of local species identity excess between individuals, expressing species turnover. It is a form of spatial partition of Gini-Simpson diversity (equivalent toFstin population genetics).Istconsidersonlyabundances (or presences) in the species-by-plots matrix.
    PHYLOGENETIC DIVERSITY STRUCTURING
    • Pst: a measure of local phyletic proximity excess between individuals, expressing species + phylogenetic turnover. It is a form of spatial partition of Rao's quadratic entropy (equivalent toNstin population genetics).Tstis the analogue for trait data, estimating the spatial partitioning of mean trait-divergence between individuals.
    • Bst: a measure of local phyletic proximity excess between individuals of distinct species, expressing phylogenetic turnover (independently of species turnover).Ustis the analogue for trait data, estimating the spatial partitioning of mean trait-divergence between individuals that belong to distinct species.
    • PIst: Bst analogue for presence/absence data, expressing phylogenetic turnover (independently of species turnover).TAUstis the analogue for trait data, estimating mean trait-divergence between distinct species.
    TRAIT DIVERSITY STRUCTURING
    • Measures analogous to those underPHYLOGENETIC DIVERSITY STRUCTURINGcan be computed from trait data. For trait data, these analogues areTst(seePst),Ust(seeBst), andTAUst(seePIst). Note: elsewhere,Ustwill be referred to asT*stbut here has been renamed to avoid issues of indexing in R. Trait values are not assumed to follow any particular model of evolution; rather, distances between observed species traits are expected to be uniform in distribution.
    • Ifall.together=TRUE, all traits will be used to generate distance a distance matrix for sampled species. Whereall.together=FALSEis used, output is generated for each trait independently.
    INTERPRETATION
    • spatial clustering: species within plots are more phylogenetically related on average than species from distinct plots wherePst > Ist,Bst > 0, orPIst > 0. Species are functionally more similar locally than those from distinct plots whereTst > Ist,Ust > 0, orTAUst > 0
    • spatial overdispersion: species within plots are less phylogenetically related on average than species from distinct plots wherePst < Ist,Bst < 0, orPIst < 0. Species are functionally less similar locally than are species from distinct plots whereTst < Ist,Ust < 0, orTAUst < 0

itemize

deqn

$$\Pi_{ST} = 1 - \frac{\Delta_S}{\Delta_T}$$

eqn

$\frac{n_k}{n_k-1}$

item

  • indices using species occurrences:
  • assumptions:

Details

spacodi.calc requires a community dataset (species-by-plots matrix; sp.plot) of numerical abundance, relative abundance, or presence | absence for plots. spacodi.calc returns statistics of diversity partitioning of plots, considering species diversity and, if additional information is provided, either trait or phylogenetic diversities among plots. If phy=NULL and sp.traits=NULL, a measure of partitioning for species diversity will be returned. In treating each pair of plots as a community unto its own, pairwise=TRUE will return estimates for diversity structuring for all pairwise combinations of plots. If a phylogeny or trait dataset is supplied with species that are not present in the community dataset (i.e., sp.plot) or vice versa, the user has the option to dynamically prune these datasets to match (prune=TRUE). If prune=FALSE and dataset mismatches occur, the function will inevitably return NaN where plots have fewer than two distinct species sampled.

For proper display, please view the package manual online (http://cran.r-project.org/web/packages/spacodiR/spacodiR.pdf) GLOBAL MEASURES

$N$: number of local communities sampled $n_k$: number of individuals sampled in local community $k$ $f_{ik}$: observed relative abundance of species $i$ in the local community $k$ ($\sum_i{f_{ik}=1}$) $p_{ik}$: presence (1) or absence (0) of species $i$ in the local community $k$ $\delta_{ij}$: phyletic or functional (trait) distance between species $i$ and $j$

References

HARDY OJ and B SENTERRE. 2007. Characterizing the phylogenetic structure of communities by an additive partitioning of phylogenetic diversity. Journal of Ecology 95:493-506. HARDY OJ. 2008. Testing the spatial phylogenetic structure of local communities: statistical performances of different null models and test statistics on a locally neutral community. Journal of Ecology 96:914-926. HARDY OJ and L JOST. 2008. Interpreting and estimating measures of community phylogenetic structuring. Journal of Ecology 96:849-852.

See Also

match.spacodi.data; as.spacodi

Examples

Run this code
# load a species-by-plots matrix, along with a tree
data(sp.example)
attributes(sp.example)
attach(sp.example)
spl
phy

# community diversity statistics of Hardy and Senterre (2007): tree-based
spacodi.calc(sp.plot = spl, phy = phy)

# community diversity statistics: trait-based with pairwise comparisons
spacodi.calc(sp.plot = spl, phy = phy, pairwise=TRUE)

# community diversity for a pair of traits
spacodi.calc(sp.plot = spl, sp.traits = trt, all.together=TRUE)

# community diversity for a pair of traits, each singly
spacodi.calc(sp.plot = spl, sp.traits = trt, all.together=FALSE)

# Ist: using abundance data only				
spacodi.calc(sp.plot = spl)	

# calculations with missing taxa between tree and sp.plot
# excluding the last five species in sp.plot, 
spacodi.calc(sp.plot = spl[1:15,], phy = phy, prune=TRUE)

# as before but with 'manual' pruning of the datasets
match.spacodi.data(sp.plot=spl[1:15,],phy=phy) -> prn.data
spacodi.calc(sp.plot=prn.data$sp.plot, phy=prn.data$sp.tree)
prn.data$sp.plot
prn.data$sp.tree

Run the code above in your browser using DataLab