Hi Maria.

I believe I just fixed this on GitHub. There was a bug in phytools for the circumstance in which some but not all nodes are labeled. You can install phytools directly from GitHub using devtools as follows:

library(devtools)
install_github("liamrevell/phytools")

& then you can test as follows:

library(phytools)
tree<-read.newick(text='((((((a))A),(((b),(b1)))B)))C;')
tree$edge.length<-rep(1,nrow(tree$edge))
plotTree.singletons(tree)
nodelabels(tree$node.label)

All the best, 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 6/22/2017 9:22 AM, Mario José Marques-Azevedo wrote:
Dears,

I'm studying the structure of phylo object to work it in my functions.
I'm using read.newick to read tree with singletons. I do not know why
the number of node is not equal to length of node.labels. For instance:

I have this tree (the same annexed):

tree<-read.newick(text='((((((a))A),(((b),(b1)))B)))C;')

tree$Nnode
[1] 10

tree$tip.label
[1] "a"  "b"  "b1"

tree$node.label
[1] "C" ""  ""  ""  "A" ""  "B"

length(tree$node.label)
[1] 7

Why nodes 11, 12 and 13 not have labels, even if it is "", in
tree$node.lable, but node 9 has?

Best regards,

Mario







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


_______________________________________________
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