Description Usage Arguments Details Value Author(s) See Also Examples
The function sp.tips
finds the shortest path between tips of a
tree, identified as tip1
and tip2
. This function
applies to trees with the class phylo
,
phylo4 or phylo4d. Several tips can be provided at a time.
1 |
x |
A tree of class |
tip1 |
A vector of integers identifying tips by their numbers, or a vector of characters identifying tips by their names. Recycled if needed. |
tip2 |
A vector of integers identifying tips by their numbers, or a vector of characters identifying tips by their names. Recycled if needed. |
useTipNames |
a logical stating whether the output must be named
using tip names in all cases (TRUE), or not (FALSE). If not, names
of |
quiet |
a logical stating whether a warning must be issued when tip1==tip2, or not (see details). |
include.mrca |
a logical stating whether the most recent common ancestor shall be included in the returned path (TRUE, default) or not (FALSE). |
The function checks if there are cases where tip1 and tip2 are the
same. These cases are deleted when detected, issuing a warning (unless
quiet
is set to TRUE).
A list whose components are vectors of named nodes forming the shortest path between a couple of tips.
Thibaut Jombart tjombart@imperial.ac.uk
shortestPath
which does the same
thing as sp.tips
, for any node (internal or tip), but much more
slowly.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.