Dear all,

I'm trying to compute the evolutionary distinctiveness of the tips of a tree
```R

tre <- collapse.singles(read.newick("tree.phy"))

evol.distinct(tre)

```

and I'm getting this error:

```R
Error in while (!(edge %in% root.edge)) { : argument is of length zero
In addition: Warning message:
In while (!(edge %in% root.edge)) { :
  the condition has length > 1 and only the first element will be used
```
which, if I am not wrong, traces back to `.get.nodes()`. The problem _probably_ 
depends on the tree being originally unrooted, but persists if I to `reroot` it 
on an inner node. That is, anything like
```R
nod<-fastMRCA(tre,"Actinocyclus_actinochilus","Tursiops_truncatus") #this two 
are far away
tre <- reroot(tre,node.number = nod, position = 
0.5*tre$edge.length[which(tre$edge[,2]==nod)])
```
seems not to be a solution (thanks to Liam Revell for the rerooting solution).


The original (unrooted) tree.phy so to replicate the error is here 
http://pastebin.com/QtGRKpfp


Best wishes,


Giulio Valentino Dalla Riva

PhD @ Biomathematics Research Centre
Room 523 - Erskine Building
University of Canterbury
Christchurch - New Zealand

phone: +64 3 364 2987 ext 4869

        [[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/

Reply via email to