[R] Rooting trees using ape

Chris Jones chris.jones at mikrob.slu.se
Wed Oct 10 15:07:37 CEST 2007

Hi all,

I seem to be having a difficult time using the 'ape' package in R  
when it comes to rooting trees.  Here's a short screenshot:

 > nirK.tree

Phylogenetic tree with 23 tips and 21 internal nodes.

Tip labels:
	Burkholder, Burkholde3, Burkholde1, Burkholde4, Burkholde5,  
Ralstonia2, ...
	Node labels:
	, 100, 100, 100, 70, 91,...

Unooted; includes branch lengths.
 > test<-root(nirk.tree, 4)
Error in root(nirk.tree, 4) : subscript out of bounds
 > test<-root(nirk.tree, "Burkholde4")
Error in root(nirk.tree, "Burkholde4") : subscript out of bounds

I tried with the example tree provided in the package, and that  
seemed to work ok.  Any suggestions?

Many thanks,

More information about the R-help mailing list