[R-sig-phylo] LTT plot non-ultrametric trees

Liam J. Revell liam.revell at umb.edu
Thu Aug 11 06:05:08 CEST 2011


Hi Rob.

I can reproduce your error, but I haven't figured out the problem yet.

You can try an earlier version of this function, which seems to work:

source("http://anolis.oeb.harvard.edu/~liam/R-phylogenetics/ltt/v0.3/ltt.R")
p2 <- ltt(t1, log.lineages=FALSE, drop.extinct=FALSE)

Sorry about this.

Also:

max(p1$times)==max(p2$times)

can be FALSE because if drop.extinct is set to TRUE, then the crown age 
of the pruned tree can be smaller than in the full tree if some lineages 
arising at the root of the tree do not leave any extant descendants.

- Liam

-- 
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.revell at umb.edu
blog: http://phytools.blogspot.com

On 8/10/2011 9:50 PM, Rob Lanfear wrote:
> library(TreeSim)
>
> library(phytools)
>
> library(geiger)
>
>
> #simulate tree of 100 taxa with initial diversification followed by a
> period of B=D
>
> t1 <- sim.rateshift.taxa(100, 1, c(0.2, 0.2), c(0.2, 0.05), c(1,1), c(0,
> 20))[[1]]
>
> t1
>
>
> #confirm number of extant taxa is 100
>
> n.extant<- length(prune.extinct.taxa(t1)$tip.label)
>
> n.extant
>
>
> #do ltt plot without extinct taxa (works fine)
>
> p1<- ltt(t1, log.lineages=FALSE, drop.extinct=TRUE)
>
>
> #do ltt plot with extinct taxa (looks odd)
>
> p2<- ltt(t1, log.lineages=FALSE, drop.extinct=FALSE)
>
>
> #max times don't seem to correspond between the two plots.
>
> max(p1$times)==max(p2$times)
>
>



More information about the R-sig-phylo mailing list