congeneric.merge(tree, species, split = "_", ...)bind.replace(backbone, donor, replacing.tip.label, donor.length = NA)
phylo phylogeny to have those
species inserted into it_, i.e. Quercus_robur.phylo)
into which the donor is to be boundphylo) to bound
into the backbone phylogenycongeneric.merge Binds missing species into a
phylogeny by replacing all members of the clade it belongs to with
a polytomy. Assumes the tip.labels represent Latin
binomials, split by the split argument. This code was
originally shipped with phyloGenerator - this is the merge
method in that program.bind.replace Binds a phylogeny (donor) into a
bigger phylogeny ('backbone'); useful if you're building a
phylogeny a la Phylomatic. A version of this R code was shipped
with phyloGenerator (Pearse & Purvis 2013). This is really an
internal function for congeneric.merge, but hopefully it's
of some use to you!
tree <- read.tree(text="((a_a:1,b_b:1):1, c_c:2):1;")
tree <- congeneric.merge(tree, c("a_nother", "a_gain", "b_sharp"))Run the code above in your browser using DataLab