spider (version 1.5.0)

sppDistMatrix: Mean intra- and inter-specific distance matrix

Description

Creates a matrix giving the mean distances within and between species.

Usage

sppDistMatrix(distobj, sppVector)

Arguments

distobj

A distance matrix.

sppVector

The species vector (see sppVector).

Value

A square matrix with dimensions length(sppVector). It contains the mean intra specific distances down the diagonal, and the mean pairwise distance between the species in the triangles. The two triangles are identical.

Examples

Run this code
# NOT RUN {
data(dolomedes)
doloDist <- ape::dist.dna(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)

sppDistMatrix(doloDist, doloSpp)


# }

Run the code above in your browser using DataCamp Workspace