make.composite.with.polytomies: 'make.composite.with.polytomies' Bind groups of species into...

Description Usage Arguments Details Value Author(s) Examples

View source: R/clean.taxonomy.R

Description

make.composite.with.polytomies Bind groups of species into a phylogeny as polytomies

Usage

1
make.composite.with.polytomies(tree, genera, species, max.genus.age = NA)

Arguments

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

Details

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.

Value

The bound phylogeny

Author(s)

Will Pearse

Examples

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)

willpearse/willeerd documentation built on May 4, 2019, 6:27 a.m.