Hi Luiz,
didn’t try that out, but here is some code I wrote for some of the
megaphylogenies I produced where you don’t want to search in a pdf or so where
the transitions are…
It’s two months ago so don’t know if it was totally save
I think you should make sure the order of the tree and
Dear Phylofolks,
Suppose I have a phylo object phy and the states at all nodes (internal and
external). Would the following function give me the number of state changes?
get.changes - function(tree, states){
sum(apply(phy$edge, 1, function(x) states[x[1]]!=states[x[2]]))
}
If not, what
If the vector states is indexed by the node numbers of phy$edge, then
the following seems like it should work:
get.changes-function(tree,states)
sum(apply(tree$edge,1,function(x,s) s[x[1]]!=s[x[2]],s=states))
This will of course only be the minimum number of changes given your
states at
Dear friends,
I am trying to adjust the leghts of a tree I created using 113 tree
species in Phylomatic using the bladj function in Phylocom. Unfortunately,
the program crashes when I use the tree without the final note about the
impossibility of matching four of the species (when I exclude