Liam Maria,
Liam J. Revell wrote on 09/02/2010 04:24:
Try this:
# given an object of class phylo called tree
# 1. create vector for terminal edge lengths
terminal.edges-matrix(NA,length(tree$tip.label));
# 2. copy terminal branches into vector
Dear All
I am trying to find a way to get a vector of only the terminal branch length
for species in a phylogeny, but cant seem to find a way
any suggestions?
Best,
Maria Mercedes
--
Maria Mercedes Gavilanez
Department of Biological Sciences
107 Life Sciences Building
Louisiana State
Try this:
# given an object of class phylo called tree
# 1. create vector for terminal edge lengths
terminal.edges-matrix(NA,length(tree$tip.label));
# 2. copy terminal branches into vector
terminal.edges-tree$edge.length[tree$edge[1:(2*length(tree$tip.label)-2),2]=length(tree$tip.label)];