Description Usage Arguments Details Value Author(s) Examples
View source: R/clean.taxonomy.R
make.composite.with.polytomies
Bind groups of species into a phylogeny as polytomies
1 | make.composite.with.polytomies(tree, genera, species, max.genus.age = NA)
|
tree |
the backbone phylogeny into which the species are to be placed |
genera |
vector, of same length as species, that delimits the groups that the species are to be placed together with |
species |
the species that will be bound into the phylogeny |
max.genus.age |
the maximum age of a group (genus) to be bound into the phylogeny; if NA (the default) there is no maximum age, and it just follows the bladj algorithm |
Binds species into the phylogeny using the values in 'genera' to group the species into polytomies. Each entry in 'genus' should be present in the tree, since the polytomy will be bound in replacing this genus. This allows you, essentially, to reproduce much of the functionality of Phylomatic. It's intended to be used to replace a representative of a genus in a phylogeny with lots of members of that genus. See the example for usage.
The bound phylogeny
Will Pearse
1 2 3 4 5 6 7 8 | ## Not run:
require(ape)
tree <- read.tree(text='((Areplacement:10,GenusB:10):10, GenusC:10);')
genera <- c("Areplacement","Areplacement","Areplacement","GenusB","GenusB","GenusC")
species <- c("A robur","A ilex","A crud","B homo","B sapiens","C us")
tree <- make.composite.with.polytomies(tree, genera, species)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.