Binds an extinct species at either (1) a randomly selected point along a branch, after truncating either end, (2) a specific fraction along a branch, or (3) a specific time point along a branch.
AvoBind(tree, node, per, per_fixed = FALSE, sp_name,
time_graft = FALSE, terminal = FALSE, mindist = 0.1)Returns a tree of class "phylo", with the extinct species grafted on.
Tree object (i.e., phylogeny)
Target node
The fraction (0-1) of total branch length to truncate at either
end of the branch for grafting (e.g. 0.2 cuts of 20% of the total branch
length from either end) if per_fixed == FALSE. If per_fixed
== TRUE, then the point along the branch where the grafting occurs: value
between 0-1, with a larger number meaning the grafting occurs closer to the
rootward end of the branch. If time_graft = TRUE, the specific point
(in millions of years, if BirdTree trees are used) for the grafting to
occur.
Logical argument: whether to graft a species on at an exact
point (as a fraction) along a branch (TRUE), which is chosen using the
per argument, rather than random (FALSE; default). Is ignored if
time_graft = TRUE.
Name of the grafted species.
Should the grafting occur at a particular time point (in
millions of years if BirdTree trees provided) along a given branch, using
avotrex:::AgeBind(). The specific point is provided using the
per argument.
Logical value: if time_graft = TRUE, is the species
being grafted to a terminal branch.
If time_graft = TRUE, but the provided grafting time
point (per) is too old (i.e., older than the parent node) or too
young (i.e., younger than the child node) relative to the focal branch,
grafting will occur mindist below the parent node or above the child
node.
Joe Wayman, Tom Matthews and Pedro Cardoso (AgeBind)