Re: [R-sig-phylo] Rooting on a node with resolve.root = TRUE

2015-04-07 Thread Emmanuel Paradis
Hi all, There is indeed a bug in root(), but there seems to be an ambiguity which needs to be solved: I think Luiz's command should give an error for the reason I try to explain below. As written in the help page, the option 'node' is an alternative to 'outgroup': node: alternatively,

Re: [R-sig-phylo] Rooting on a node with resolve.root = TRUE

2015-03-19 Thread Liam J. Revell
Maybe this is obvious, but even though your tree is unrooted, node 6 is the root of the edge matrix for the tree (i.e., it has the node number equal to Ntip(tree)+1) - thus: t5-multi2di(t5) will give you a resolved tree rooted at this node. There seems to be a bug in root when you try to

[R-sig-phylo] Rooting on a node with resolve.root = TRUE

2015-03-19 Thread Luiz Max Carvalho
Dear phylofolks, I'm trying to root a tree on an internal (rather than a terminal) branch. Here is a small example: library(ape) t5 - rmtree(N = 1, n = 5, rooted = FALSE)[[1]] root(t5, node = 6, resolve.root = TRUE) output: Error in if (i != N) { : argument is of length zero root(t5, node =