Struggling to connect two phylogenetic trees together in R

60 Views Asked by At

I've become very stuck on what I assumed would be a very simple thing and would appreciate any help!

I have two trees that I want to connect together at their roots, whilst preserving both root edges, but everything I try (using bind.tree) seems to fail.

First method I tried:

bind.tree(treeA, treeB)

seems to remove root edges.

2nd method I tried involved creating an "ancestor" tree consisting of these root edges I was trying to conserve and binding both trees to that:

Progress_Tree<- bind.tree(anc_tree, TreeA, where = 1)
Error in x$edge[, 2] : incorrect number of dimensions

Or if I unroot TreeA, I can attach it, but when I then attach TreeB, it adds all of the tips of both trees, but only contains a list of a very small number of edges.

I'm just so confused.

0

There are 0 best solutions below