Proxies to dynamically drop multiple nodes or edges to an already existing graph with a *delay* between each removal.
sg_drop_nodes_delay_p(proxy, data, ids, delay, refresh = TRUE, cumsum = TRUE)sg_drop_edges_delay_p(proxy, data, ids, delay, refresh = TRUE, cumsum = TRUE)
An object of class sigmajsProxy
as returned by sigmajsProxy
.
A data.frame
of _one_ node or edge.
Ids of elements to drop.
Column name containing delay in milliseconds.
Whether to refresh the graph after node is dropped, required to take effect, if you are running force the algorithm is killed and restarted at every iteration.
Whether to compute the cumulative sum of the delay.
The proxy
object.
The delay helps for build dynamic visualisations where nodes and edges do not disappear all at the same time.
How the delay works depends on the cumsum
parameter. if TRUE
the function computes the cumulative sum
of the delay to effectively drop each row one after the other: delay is thus applied at each row (number of seconds to wait
before the row is dropped *since the previous row*). If FALSE
this is the number of milliseconds to wait before the node or
edge is added to the visualisation; delay
is used as passed to the function.