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.
sizenumber of distinct nodes in the set
idsof all nodes in the set.
child_idslist of ids of all node children
attributeslist of attributes of all nodes
datalist of data of all nodes
dumpall 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)
xnode 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)
fromid of originating node
toid of target node
ftransfer 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)
idhash 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)
processthe 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)
processthe process to apply
the final count of nodes
clone()The objects of this class are cloneable with this method.
NodeSet$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.