Description Details Active bindings Methods
R6 class representing a set of nodes (defined by 'tag', see helpers).
R6 class representing a set of nodes (defined by 'tag', see helpers).
The set is composed of nodes, nodes are inserted and then tracked by id. Identical nodes (name and attributes) have their children merged on insert.
size
number of distinct nodes in the set
ids
of all nodes in the set.
child_ids
list of ids of all node children
attributes
list of attributes of all nodes
data
list of data of all nodes
dump
all data/attributes from all nodes as lists
new()
Used as NodeSet$new(...) create a new node set
NodeSet$new(...)
...
nodes to be inserted into the set
a 'NodeSet' object.
insert()
insert a new node into the set, if it is identical (name and attributes) as a current member, merge it into that member so that all children are preserved.
NodeSet$insert(x)
x
node to insert
TRUE iff the new node was not identical to any other node (set size increases).
link()
insert a new edge into the set, if it is identical to a current link, merge it into that link
NodeSet$link(from, to, f = NULL)
from
id of originating node
to
id of target node
f
transfer function implementing the edge
id of edge
clear()
clear the current nodes from the set
NodeSet$clear()
get()
get a node from the set
NodeSet$get(x)
id
hash of the node
node with the 'id', or NULL if missing
pop()
pop the set, return the remaining node or error if multiple nodes remain
NodeSet$pop()
filter()
return a subset node set with only a subset of nodes.
NodeSet$filter(...)
...
expression (matches 'dplyr::filter' used to subset
subset of nodes
mutate()
modify nodes returns modified nodes *also* modifies original
NodeSet$mutate(..., .which = "data")
...
expression (matches 'dplyr::mutate') used to modify
modified nodes
build()
apply a process (a list of transitions) to all nodes in the set until no new nodes are created.
NodeSet$build(process)
process
the process to apply
the final count of nodes
modify()
apply a process (a list of transitions) to all nodes in the set once. Does not create new nodes.
NodeSet$modify(process)
process
the process to apply
the final count of nodes
clone()
The objects of this class are cloneable with this method.
NodeSet$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.