fruchterman_reingold {VBLPCM} | R Documentation |
Perform Fruchterman-Reingold layout of a network in 2 or more dimensions.
Description
This was written and incorporated into the VBLPCM package because the Fruchterman-Reingold routine in the network package only works in two dimensions.
Usage
fruchterman_reingold(net, D=2, steps=1000, repulserad=N^D, m=N*(D-1),
volume=N*(D-1))
Arguments
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. |
Value
An N*D matrix of coordinates.
Author(s)
Michael Salter-Townshend
See Also
log_like_forces
Examples
### 2D example
### load the aids blogs dataset
data(aids)
### perform the Fruchterman-Reingold layout
X<-fruchterman_reingold(aids.net, D=2, steps=1e3)
### plot the results
plot(X)
### 3D example
### load the aids blogs dataset
data(aids)
### perform the Fruchterman-Reingold layout
X<-fruchterman_reingold(aids.net, D=3, steps=1e3)
### Not run
### plot the results in 3D
# library(rgl)
# plot3d(X)
[Package VBLPCM version 2.4.9 Index]