Description Usage Arguments Details Value Author(s)
Match elements within a tree grob (generated by
treeGrob
), using the name or class of the child
component.
1 |
tree_grob |
A grob created by |
class |
The class of the object to match. Currently this can
be any class attribute (for cases with multiple inheritance) but
this might change soon to be only the primary class. Also it only
makes sense to match things with a |
name |
The name of the object to match. Some functions set
the name automatically for you (e.g., |
warn_no_match |
Give a warning if no match is found. |
This matches elements that were added to the tree by the +
operator; such as tree_grob + tree_node_labels()
. A few
rules are useful here (and may change).
All classes provided by forest
are prefixed with
tree_
, so elements provided as class
will almost
always need this adding. I might change things to automatically
add this in the future though, as the prefix might change.
tree_tip_labels
and tree_node_labels
both
produce objects with class tree_labels
.
tree_tip_labels
will always have the name of
tips
and tree_node_labels
will always have the name
of nodes
, so they can be addressed with tree_match(.,
class="tree_labels", name="tips")
, for example.
There can be only one set of branches and this always has the name "branches".
When both specified, class
and name
must both
be satisified.
A list of gPath
objects that can be used to
reference children relative to tree_grob
Rich FitzJohn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.