Hi Sergio,
Sorry for being late to the party, but maybe expandTaxonTree in
paleotree does what you're looking for? I wrote it for turning trees
of genera into trees of species, with the resulting generic polytomies
collapsed or not (in case we know that the genera is paraphyletic).
Cheers,
-Dave
Thank you all for your suggestions. I guess the more direct way is to use
Megaptera. I tried and it worked (I added Man cra1, Man cra2, etc.). However, I
wanted it to create a new node that would basically include all these taxa. I
sthere any way to merge all the added species in a new node?
Just to add to the slew of other good options, I have a small package up on
GitHub (https://github.com/eliotmiller/addTaxa/tree/master/R) that is
basically a big loop around Liam's bind.tip. There are examples included
with the package. The main function you'd be interested in is
Another possibility would be addSingleTip() and addTips() from the megaptera
package (https://github.com/heibl/megaptera). The latter function can add any
number of tips; the loop that Liam mentioned is already build into that
function. This is potentially very slow, but for your tree size it
The function add.species.to.genus may do what you want. It adds a single
species to the group defined by the MRCA of members of a genus, according to
multiple criteria (randomly and so on). It can add only one species at a time,
so you will need to write a for loop or something to iterate over
Hi Sergio,
try ‘bind.tip' and just make a loop to add more. Or ‘bind.tree’ if you want to
add a clade.
Cheers,
Franz
> On 19 Jun 2017, at 13:58, Sergio Ferreira Cardoso
> wrote:
>
> Hello all,
>
> I'm using the package 'phytools' to try to add
Hello all,
I'm using the package 'phytools' to try to add terminal branches to a tree
(attached). I tried to use add.everywhere function to add terminal branches. I
have 167 terminal taxa inside each of the 7 genera on my tree. Basically, I
just wanted to add some dozens of specimens to the