Description Usage Arguments Value Author(s) References See Also Examples
When branch lengths in an ultrametric phylogenetic tree are expressed as divergence times, the total sum of branch
lengths in that tree expresses the amount of evolutionary history. The function randEH
calculates the amount of evolutionary history preserved when k random species out of n
original species are saved.
1 | randEH(phyl, nbofsp, nbrep = 10)
|
phyl |
an object of class phylog |
nbofsp |
an integer indicating the number of species saved (k). |
nbrep |
an integer indicating the number of random sampling. |
Returns a numeric vector
Sandrine Pavoine pavoine@mnhn.fr
Nee, S. and May, R.M. (1997) Extinction and the loss of evolutionary history. Science 278, 692–694.
Pavoine, S., Ollier, S. and Dufour, A.-B. (2005) Is the originality of a species measurable? Ecology Letters, 8, 579–586.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(carni70)
carni70.phy <- newick2phylog(carni70$tre)
mean(randEH(carni70.phy, nbofsp = 7, nbrep = 1000))
## Not run:
# the folowing instructions can last about 2 minutes.
data(carni70)
carni70.phy <- newick2phylog(carni70$tre)
percent <- c(0,0.04,0.07,seq(0.1,1,by=0.1))
pres <- round(percent*70)
topt <- sapply(pres, function(i) optimEH(carni70.phy, nbofsp = i, give = F))
topt <- topt / EH(carni70.phy)
tsam <- sapply(pres, function(i) mean(randEH(carni70.phy, nbofsp = i, nbrep = 1000)))
tsam <- tsam / EH(carni70.phy)
plot(pres, topt, xlab = "nb of species saved", ylab = "Evolutionary history saved", type = "l")
lines(pres, tsam)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.