force {sigmajs}R Documentation

Add forceAtlas2

Description

Implementation of forceAtlas2.

Usage

sg_force(sg, ...)

sg_force_start(sg, ...)

sg_force_stop(sg, delay = 5000)

sg_force_restart_p(proxy, ..., refresh = TRUE)

sg_force_restart(sg, data, delay, cumsum = TRUE)

sg_force_start_p(proxy, ..., refresh = TRUE)

sg_force_stop_p(proxy)

sg_force_kill_p(proxy)

sg_force_config_p(proxy, ...)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

...

Any parameter, see official documentation.

delay

Milliseconds after which the layout algorithm should stop running.

proxy

An object of class sigmajsProxy as returned by sigmajsProxy.

refresh

Whether to refresh the graph after node is dropped, required to take effect.

data

data.frame holding delay column.

cumsum

Whether to compute the cumulative sum of the delay.

Details

The delay helps for build dynamic visualisations where nodes and edges do not appear 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 add each row one after the other: delay is thus applied at each row (number of seconds to wait before the row is added *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.

Value

Their first arguments, either sg or proxy.

Functions

See Also

official documentation

Examples

nodes <- sg_make_nodes(50)
edges <- sg_make_edges(nodes, 100)

sigmajs() %>%
  sg_nodes(nodes, id, label, size) %>%
  sg_edges(edges, id, source, target) %>% 
  sg_force() %>% 
  sg_force_stop() # stop force after 5 seconds


[Package sigmajs version 0.1.5 Index]