2

I am trying to upload a phylogenetic tree named Symonds.tre that is in my working directory and is .tre

library(ape)
symondsTree <- read.tree("symonds.tre")

Error message is:

Error in if (all(phy$node.label == "")) phy$node.label <- NULL :missing value where TRUE/FALSE needed

Do I have to do something to the labels or nodes, is there something missing? Thanks for your help, Y

MLavoie
  • 9,671
  • 41
  • 36
  • 56
  • `read.tree` isn't part of base R. So we need to know what package you are using (`data.tree` perhaps?). We also need to see (at least part of) your tree. Please see [this post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) for help on how to create a simple self-contained and reproducible example. Providing one will help us to help you. – Limey May 29 '20 at 07:31
  • Hello thank you so much for getting back to me. I am using ape, geiger and caper. – Yamila Gurovich Jun 01 '20 at 02:55
  • Hello thank you so much for getting back to me. I am using ape, geiger and caper. The tree i am using is already published tree by Bininda-Emonds et al 2007 mammal super tree. I have a data matrix with some mammal taxa that are also analysis in that phylogeny and want to do a pgls analysis using ape library. Do you want a copy of the tree? thanks Yamila – Yamila Gurovich Jun 01 '20 at 03:53
  • @YamilaGurovich did you ever solve this? – Dylan_Gomes Feb 28 '21 at 03:31

2 Answers2

3

for the record, I just ran into this problem, and it seems like I was trying to read in a NEXUS file using read.tree from the package ape which only works on Newick format trees. I changed the command to read.nexus and that took care of it.

nmarieh
  • 31
  • 3
-1

open the .nex in TextEdit and check if it is empty

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 02 '22 at 09:36
  • Please phrase this as an explained conditional answer, in order to avoid the impression of asking a clarification question instead of answering (for which a comment should be used instead of an answer, compare https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead ). For example like "If your problem is ... then the solution is to .... because .... ." – Yunnosch May 04 '22 at 06:01