Deal Liam and Emmanuel,

Thank you very much. I tried to open the file this way:

obj<-scan(file="TimetreeOfLife2015.tre",n=1,skip=2,what="character")
tree<-read.tree(text=obj)

It worked but then there were other errors. Something is wrong with te edge
lengths. I can't even plot the tree. I tried with read.tree but the errors
persisted.

When I used another tree, everything worked fine, so I guess I'll just use
that one.

Once again, thank you.

Sérgio.

2016-05-23 20:55 GMT+01:00 Emmanuel Paradis <emmanuel.para...@ird.fr>:

> Liam is probably right: there seems to be something missing in the NEXUS
> file.
>
> The Newick file from the same site can also be read with read.tree.
>
> Emmanuel
>
>
> Le 23/05/2016 18:21, Liam J. Revell a écrit :
>
>> It looks like the NEXUS file might be badly conformed.
>>
>> You could try:
>>
>> obj<-scan(file="TimetreeOfLife2015.tre",n=1,skip=2,what="character")
>> tree<-read.tree(text=obj)
>>
>> That seemed to work for me.
>>
>> - 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 5/23/2016 12:11 PM, Sergio Ferreira Cardoso wrote:
>>
>>> Dear all,
>>>
>>> I am trying to open a .tre file with ape. I downloaded the tree from
>>> http://www.timetree.org/book#treefiles. It's a .tre (not .nex) file, but
>>> it's essentially a nexus. I tried to open it:
>>>
>>> tr <- read.nexus(file="TimetreeOfLife2015.tre")
>>>>
>>> Error in trees[[i]] : subscript out of bounds
>>>
>>> I tried to change the file name to .nex, but it wouldn't work. I saw some
>>> previous threads but I couldn't solve the problem.
>>> Does anyone know how can I solve this?
>>>
>>> Thanks in advance,
>>> Sérgio.
>>>
>>> ps: I have the lastest 3.4 version of ape.
>>>
>>>
>> _______________________________________________
>> 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/
>>
>


-- 
Com os melhores cumprimentos,
Sérgio Ferreira Cardoso.

--------------------

Best regards,
Sérgio Ferreira Cardoso




MSc. Paleontology
Museu da Lourinhã, GEAL.

Lisboa, Portugal

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