tips.expected: Calculate Expected Tips in a Clade

View source: R/tips.expected.R

tips.expectedR Documentation

Calculate Expected Tips in a Clade

Description

Given a tree and a set of tips, this function determines the most recent common ancestor (MRCA) of these tips and calculates how many tips are expected to be in a clade with this MRCA. Requires the installation of the package phangorn.

Usage

tips.expected(tr, tips, value = FALSE, ...)

Arguments

tr

The tree, of class phylo.

tips

A vector of tip labels from which to calculate MRCA.

value

A boolean determining what the function returns. If TRUE, it returns a vector of the tip labels of the MRCA's expected descendents for a full clade. If FALSE, it returns the number of expected descendents.

...

Arguments to be passed to the function Descendents in phangorn.

Details

The default for value is FALSE.

Value

out

Either the number of expected descendents from the MRCA, or a vector of tip labels of the expected descendents, depending on the argument value.

Author(s)

Andrew Hipp and Kasey Pham

References

Schliep K.P. 2011. phangorn: phylogenetic analysis in R. Bioinformatics, 27(4) 592-593. http://phangorn.org.

See Also

phangorn, getMRCA, Descendents


andrew-hipp/morton documentation built on April 7, 2024, 12:15 p.m.