Description Usage Arguments Details Value Author(s)
Build a node. This is a low-level function that should not be needed that often.
1 | forest_node(label = "", length = NA_real_, data = NULL)
|
label |
Label for the node (single-element character vector) |
length |
Branch length from root to tip (single-element numeric, non-negative) |
data |
Arbitrary data to associate with the node. |
Nodes are very lightly wrapped lists with the S3 class
forest_node
. I don't think that we need or want reference
semantics here and this keeps things nice and lightweight.
Methods have been defined for the subset and assignment operators
so that the object only has the elements label
,
value
and data
. This will impose a minor lookup
cost for the assignment operators, but reading should not be
affected except for [
(so prefer \$
and [[
).
An object of type forest_node
Rich FitzJohn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.