Skip to contents

Given a tree and a results data frame, add a new MRCA column that records the node ID of the most recent common ancestor in that tree for each row.

Usage

recordAncestor(df, tree)

Arguments

df

A results data frame created with the extractValues() function

tree

A tree created with the makeTidyTree() function.

Value

The df data frame with a new MRCA column.

See also

Other Functions for trees: childSpecies(), extractValues()

Other Focal clade functions: eog(), focalClade(), recordClades(), subTree(), visualizeTree()

Author

Noa Brenner

Charles Plessy

Examples

recordAncestor(Halo_DF, Halo_Tree)$MRCA
#>  [1] 11 10  7  7  9 11 10  7  7  9 10 10  7  7  9  7  7  7  8  7  7  7  7  8  7
#> [26]  9  9  9  7  7