Creates a summary table of community overlap for all possible pairwise combinations of samples (e.g. sites, plots) using the `similarity`

function.

1 |

`abundances` |
Community data as a matrix where columns are individual species and rows are sites. Matrix elements are abundance data (e.g. counts, percent cover estimates). May be given as a vector with abundances2 as a vector for a second community. |

`abundances2` |
Community data, a vector of different species within a site. Vector elements are abundance data (e.g. counts, percent cover estimates). If abundances is given a matrix, then abundances2 defaults to a logical FALSE statement. |

`q` |
Order of the diversity measure. Defaults to the Shannon case where q = 1. |

`boot` |
Logical indicating whether to use bootstrapping to estimate uncertainty. |

`boot.arg` |
(optional) List of arguments to pass bootstrapping function: list(s.sizes=number you specify, num.iter=number you specify) |

This function calculates pairwise similarity for two or more samples, so the abundance data must be a matrix with two or more rows (samples). Depending on the specification of the order (q), other different similarity indices may be calculated (e.g. Sorenson index when q=0, Horn index when q=1, Morisita-Horn index when q=2) (Jost 2007).

`Similarity` |
A matrix of pairwise similarities showing community overlap calculated using the similarity function. |

`StdErr` |
(optional) Standard error of value estimated through bootstrapping. |

Noah Charney, Sydne Record

Jost, L. 2007. Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439.

`sim.table`

, `sim.groups`

, `bootstrap`

1 2 3 4 5 6 7 | ```
data(simesants)
hemlock<-subset(simesants,Habitat=="Hemlock")[,-1]
hardwood<-subset(simesants,Habitat=="Hardwood")[,-1]
similarity(rbind(hemlock,hardwood))
similarity(hemlock,abundances2=hardwood)
similarity(hemlock,abundances2=hardwood,boot=TRUE)
similarity(hemlock,abundances2=hardwood,q=2,boot=TRUE,boot.arg=list(num.iter=200))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.