I have error message trying to show a phylogenetic tree using R studio, I can not upload it

Viewed 1392

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

2 Answers

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.

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

Related