[R] help on drawing a tree with "ape"?

Ben Bolker bolker at ufl.edu
Mon Nov 12 20:07:29 CET 2007




Hua Li wrote:
> 
> Dear Simon and everyone,
> 
> Thanks for response. 
> 
> Specifically, I have a tree with species "A, B, C" and
> can be written as
> "((A:45.15,C:45.15):46.19,B:91.34):0.0;" . If I use
> the R command
>> mytreeABC
> 
> [1] "((A:45.15,C:45.15):46.19,B:91.34):0.0;"
> 
>>     plot(read.tree(text = mytreeABC))
> 
> --- Simon Blomberg <s.blomberg1 at uq.edu.au> wrote:
> 
>> ?edgelabels
>> 
> 

   Did you look at the examples in the file suggested by Simon?
Unfortunately, the PS file but not the JPG came through in the
version I read.

  It seems to me you may want _node_ labels rather
than _edge_ labels?    See below ...

mytreeABC = "((A:45.15,C:45.15):46.19,B:91.34):0.0;"
t1 = read.tree(text=mytreeABC)
library(ape)
plot(t1)
edgelabels(1:4)
nodelabels(c("a","b"))

-- 
View this message in context: http://www.nabble.com/help-on-drawing-a-tree-with-%22ape%22--tf4789546.html#a13711995
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list