Description Usage Arguments Details Value Author(s) See Also Examples
Separates a distance matrix into its inter- and intra-specific components.
1 |
distobj |
A distance matrix. |
sppVector |
The species vector (see |
This function can be used to produce histograms and other charts exploring the ‘barcode gap’, such as in the examples below.
A list with two elements:
inter |
A numeric vector containing ALL inter-specific pairwise distances. |
intra |
A numeric vector containing ALL intra-specific pairwise distances. |
Samuel Brown <s_d_j_brown@hotmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(dolomedes)
doloDist <- dist.dna(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)
doloSpDist <- sppDist(doloDist, doloSpp)
doloSpDist
#Histogram of the barcode gap
transGreen <- rgb(0, 1, 0, 0.5) #Make a slightly transparent colour to see some overlap
hist(doloSpDist$inter, col="grey")
hist(doloSpDist$intra, col=transGreen, add=TRUE)
#Boxplot of the same
boxplot(doloSpDist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.