Perform Fruchterman-Reingold layout of a network in 2 or more dimensions.
Perform Fruchterman-Reingold layout of a network in 2 or more dimensions.
This was written and incorporated into the VBLPCM package because the Fruchterman-Reingold routine in the network package only works in two dimensions.
net: network object on which to perform Fruchterman-Reingold layout.
D: Desired dimension of the space in which to lay out the network.
steps: Number of desired iterations.
repulserad: The radius at which repulsion and attraction of linked nodes are equal.
m: The maximum change in position per iteration.
volume: The volume of space within which to position the nodes.
Returns
An N*D matrix of coordinates.
Author(s)
Michael Salter-Townshend
See Also
log_like_forces
Examples
### 2D example### load the aids blogs datasetdata(aids)### perform the Fruchterman-Reingold layoutX<-fruchterman_reingold(aids.net, D=2, steps=1e3)### plot the resultsplot(X)### 3D example### load the aids blogs datasetdata(aids)### perform the Fruchterman-Reingold layoutX<-fruchterman_reingold(aids.net, D=3, steps=1e3)### Not run### plot the results in 3D# library(rgl)# plot3d(X)