This now should be fixed on GitHub. Use:

devtools::install_github("liamrevell/phytools")

to install.

Thanks for pointing this out & let me know if you encounter any issues.

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 11/12/2015 11:55 PM, Liam J. Revell wrote:
Hi Graeme.

Not sure how this bug was introduced. It may be because you were once
able to root the tree at a tip, but now you cannot. I will have to roll
back ape & check. You can work around it by setting the optional
argument tips to TRUE, i.e.:

rerootingMethod(tree, tipvals, model="ER", tips=TRUE)

I can try to fix the bug tomorrow; however I would also mention that now
that ace does marginal ancestral state reconstruction (by default for
discrete characters) it is not really necessary to use rerootingMethod
(though of course you are welcome to do so if you want!).

All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 11/12/2015 11:36 PM, Graeme Lloyd wrote:
Hello All,

I was wondering if anyone can help. I keep getting the same error from
rerootingMethod in phytools:

Error in root(tree, node = nn) :
   incorrect node#: should be greater than the number of taxa

A reproducible (hopefully) example:

library(phytools)
tree <- read.tree(text =
"(((A:0.3383212152,B:0.3674720824):0.1973555889,C:0.06875358336):0.6963759675,D:0.8614551255);")

tipvals <- matrix(c(1, 1, 0, 0, 0, 0, 1, 1), ncol = 2, dimnames =
list(c("A", "B", "C", "D"), c("0", "1")))
rerootingMethod(tree, tipvals, model="ER")

I am running R 3.2.2 and phytools 0.5.0, i.e., the most up-do-date
CRAN versions.

Thanks in advance,


Graeme
_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at
http://www.mail-archive.com/r-sig-phylo@r-project.org/


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at
http://www.mail-archive.com/r-sig-phylo@r-project.org/

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to