A couple of days ago I received the following comment about the phytools function ltt95:
"I'm using ltt95 function with the times method and log transformed y axis, but I get reversed ages (both in the plot and in the results table). I’ve not been able to tackle down this small issue."
Well, this isn't precisely a bug of ltt95. ltt95 merely records the accumulation of lineages forward in time from the root; rather than backward (as I believe is more common in publications) from the present time.
In a newly updated version of the function I have now added the argument xaxis which can assume three values: "standard" (forward in time lineage accumulation, as in the current CRAN version of phytools); "flipped" (the time-from-the-present plot); and "negative" (similar to "flipped", but with negative time from the present). At the same time I also have modified ltt95 to return an object of class "ltt95" invisibly (don't worry, this is just the same matrix with some attributes); and I have added S3 generic plotting & print methods for objects of this class.
Here's a demo - but the function can be used in more diverse ways than I will demonstrate here:
Loading required package: ape
Loading required package: maps
Loading required package: rgl
> ## simulate some trees
100 phylogenetic trees
> ## run ltt95
> ## (I could have done this originally too)
Object of class "ltt95".
Code for this new function version is here and it is in a phytools build, which can be downloaded & installed from source.
That's all for now.
Post a Comment
Note: due to the very large amount of spam, all comments are now automatically submitted for moderation.