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

Hua Li hualihua at yahoo.com
Mon Nov 12 17:22:40 CET 2007


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))

I would get a tree as shown in "Rresult.ps" file.
However, I would like the tree to show like in
"treeABC.jpg" file.

In case the r-hlep list do not allow attachment, here
is what Rresult.ps look like:

|-------------B
|
|
|      |------C
|------|
       |------A

for the tree I want (in treeABC.jpg), I would mark the
edge AC as "b", and the edge AB as "a". 


Thank you very much for help!

Hua


--- Simon Blomberg <s.blomberg1 at uq.edu.au> wrote:

> ?edgelabels
> 
> On Sun, 2007-11-11 at 16:51 -0800, Hua Li wrote:
> > Dear all,
> > 
> > I'm using the "ape" package in R and want to draw
> a
> > phylogenetic tree with not only the tip labels but
> > also some labels for the edges. e.g. Mark the edge
> AB
> > as "m" in the tree ABC.  
> > 
> > Couldn't find a way to do that. Can someone help?
> > 
> > Thanks,
> > 
> > Hua
> > 
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> reproducible code.
> -- 
> Simon Blomberg, BSc (Hons), PhD, MAppStat. 
> Lecturer and Consultant Statistician 
> Faculty of Biological and Chemical Sciences 
> The University of Queensland 
> St. Lucia Queensland 4072 
> Australia
> Room 320 Goddard Building (8)
> T: +61 7 3365 2506 
> email: S.Blomberg1_at_uq.edu.au
> 
> Policies:
> 1.  I will NOT analyse your data for you.
> 2.  Your deadline is your problem.
> 
> The combination of some data and an aching desire
> for 
> an answer does not ensure that a reasonable answer
> can 
> be extracted from a given body of data. - John
> Tukey.
> 
> 


__________________________________________________


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rresult.ps
Type: application/postscript
Size: 2984 bytes
Desc: 2580773267-Rresult.ps
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20071112/c057a1c4/attachment.ps 


More information about the R-help mailing list