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 = 7, resolve.root = TRUE) output: Phylogenetic tree with 5 tips and 4 internal nodes. Tip labels: [1] "t4" "t3" "t2" "t5" "t1" Rooted; includes branch lengths. I don't understand why rooting at node 6 throws an error, while using node 7 is fine. What am I missing? Cheers, Luiz -- Luiz Max Fagundes de Carvalho PhD student, Institute of Evolutionary Biology, School of Biological Sciences, Ashworth Laboratories, Ash 2, office 123 University of Edinburgh, United Kingdom. http://br.linkedin.com/pub/luiz-max-carvalho/49/687/283 [[alternative HTML version deleted]] _______________________________________________ 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/