Description Details Active bindings Methods
R6 class representing a single node, with links to child nodes
R6 class representing a single node, with links to child nodes
The node has a name, an environment that contains its attributes, and a NodeSet that contains its children, along with accessors for required functionality (determined by downstrea).
idnode id as string
childrenNodeSet of child nodes
child_idscharacter vector of child ids
attributesnode attributes
datanode data
dumpcontents as a list
jsonnode contents as JSON
new()Used as Node$new(...) create a new node
Node$new(name, ..., .children = NodeSet$new())
namename of the node (arbitrary label, not checked).
...an attributes to record (in the environment).
.childrenoptoinally a list of child nodes (as NodeSet)
a 'Node' object
matches()Check whether this node matches conditions specified in dots
Node$matches(...)
...interpreted as in 'dplyr::filter' against the node attributes.
TRUE iff the tests pass
mutate()Modify node attributes as specified in dots
Node$mutate(..., .which = "attributes")
...interpreted as in 'dplyr::mutate' against the node attributes using a data mask and quosures.
.whicheither 'attributes' in which case the static node attributes are modified and a new node ID will be generated or 'data' (anything else really) and the mutable data in the node will be modified.
modified version of self
spawn()Deep-clone the node and mutate node attributes as specified in dots
Node$spawn(...)
...interpreted as in 'dplyr::mutate' against the node attributes using a data mask and quosures.
modified version of the cloned node
merge()Merge another node's child id's into this node. Only makes sense on a node with identical id's... should test that,
Node$merge(x)
xanother Node object.
modified self
disown()Clear record of child nodes, internal use
Node$disown()
self, without children
transform()Create a new node using transformations described in a Transition object
Node$transform(x)
xtransition object
a *child* object created by applying the transition
modify()Modify the current node using transformations described in a Transition object
Node$modify(x)
xtransition object
self object created by applying the transition
get()Retrieve an attribute value by symbol (or character string).
Node$get(x)
xbare symbol or character string
value of x in node attributes
has()Check for presence of attribute by symbol (or character string).
Node$has(x)
xbare symbol or character string
TRUE iff x exists as an attribute
clone()The objects of this class are cloneable with this method.
Node$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.