Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-12 Thread David Bapst
Hi Klaus (and others), Ah, I see! The real bug then appears to be in collapse.singles, as it does not reorder the ID numbers in $edge. Here's a quick function to return the root ID: getRootID<-function(tree){ uniqueNode<-unique(tree$edge[,1]) whichRoot<-sapply(uniqueNode,function(x)

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-12 Thread Klaus Schliep
Hi David, I found the bug. Somehow ape assumes on the one hand that the root is number of tips + 1. On the other hand the root of an phylo object is the node which is in tree$edge[,1], but not in tree$edge[,2], this is the case even in an unrooted tree. This annoys me for a long time. The root of

[R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-12 Thread David Bapst
Hello all, As those of you who directly manipulate the guts of phylo objects in your code (or construct new phylo objects whole cloth from un-phylo-like data structures) have probably experienced, it is sometimes easy to create $edge matrices that aren't accepted by ape functions (I often use plot

Re: [R-sig-phylo] Links are not drawn properly

2015-06-12 Thread Aleksey Jironkin
Brilliant, space=500 sorted that out. Alex On Fri, 2015-06-12 at 17:14 +0200, Emmanuel Paradis wrote: > Hi Alex, > > Try to increase the space between the trees (see the example in > ?rotateConstr). > > Cheers, > > Emmanuel > > Le 10/06/2015 15:52, Aleksey Jironkin a écrit : > > > > Hi, >

Re: [R-sig-phylo] Links are not drawn properly

2015-06-12 Thread Emmanuel Paradis
Hi Alex, Try to increase the space between the trees (see the example in ?rotateConstr). Cheers, Emmanuel Le 10/06/2015 15:52, Aleksey Jironkin a écrit : Hi, I have been struggling to get the links drawing properly on largeish cophyloplot. I got the diagonal links to work on sample comman