On 12-01-12 01:54 PM, Megan Bartlett wrote:
> Hi,
>
> I'm trying to use R package ape to manipulate the phylocom megatree,
> version R20091110. However, whenever I try to read in the tree with:
>
> read.tree("R20091110.new.txt")
>
> I get the error message:
>
> Error in if (sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1]
>> :
> missing value where TRUE/FALSE needed
>
> I know that the suggested fix is to delete "(" and ")euphyllophyte" from
> the beginning and end of the file, but this doesn't solve the problem.
> Trying to read the new tree gives me exactly the same error message. What
> should I be doing instead?
>
> Thanks so much for your help!
>
> Best,
>
> Megan Bartlett
>
> [[alternative HTML version deleted]]
>
I started to respond to this on [email protected] ... it's best not
to cross-post if you can help it, or at least to say that you're
crossposting (and why).
Based on this small experiment:
library(ape)
r <-
read.tree(url("http://svn.phylodiversity.net/tot/megatrees/R20091110.new"))
r <- read.tree(text="(((abc)def,(ghi)jkl),(mno)pqr);")
r <- read.tree(text="((def,jkl),pqr);")
it looks like ape's read.tree() doesn't like the internal-node
labeling convention that phylocom is using. Someone else will probably
respond more helpfully ...
Ben Bolker
_______________________________________________
R-sig-phylo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo