randEH: Nee and May's random process

Description Usage Arguments Value Author(s) References See Also Examples

Description

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.

Usage

1
randEH(phyl, nbofsp, nbrep = 10) 

Arguments

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.

Value

Returns a numeric vector

Author(s)

Sandrine Pavoine pavoine@mnhn.fr

References

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.

See Also

optimEH

Examples

 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)

ade4 documentation built on May 31, 2017, 4:06 a.m.

Search within the ade4 package
Search all R packages, documentation and source code