Description Usage Arguments Value Examples
The function siblings
returns the siblings
of a node in a given tree.
1 2 3 4 |
.node |
node or character. The node or label of the node considered. |
.tree |
A tree. |
include_node |
logical. If |
A (possibly empty) list of nodes.
1 2 3 4 5 6 7 8 9 | ## Rooted tree
(tr0 = c_("Bob", "Carl", "Daniel"))
(tr1 = c_("Bill", "Caroline", "Dimitri", "Enoc"))
(tr2 = r_("Alice", s = list(tr0, tr1)))
siblings("Bob", tr2)
## Unrooted tree
(tr3 = r_(s = list(tr2, c_("Grand-Mother", "Father", "Son"))))
siblings("Alice", tr3) # note that in 'tr3', Alice and Grand-Mother are not siblings
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.