Another option is the statnet package. Statnet has functions for all the commonly used measures in SNA, and can also estimate ERG models. If you have your data in an edge list, read in the data as follows (assuming your data frame is labelled "edgelist"):
net <- as.network(edgelist, matrix.type = "edgelist", directed = TRUE) #if the network is directed, otherwise: directed = FALSE
If your data is in an adjacency matrix you replace the matrix.type argument with "adjacency":
net <- as.network(edgelist, matrix.type = "adjacency", directed = TRUE)
The statnet package has some very nice plotting capabilities. To do a simple plot simply type:
gplot(net)
To scale the nodes according to their betweenness centrality, simply do:
bet <- betweenness(net)
gplot(net, vertex.cex = bet)
By default the gplot function uses Fruchterman-Reingold algorithm for placing the nodes, however this can be controlled from the mode option, for instance to use MDS for the placement of nodes type:
gplot(net, vertex.cex, mode = "mds")
or to use a circle layout:
gplot(net, vertex.cex, mode = "circle")
There are many more possibilities, and this guide covers most of the basic options.
For a self contained example:
net <- rgraph(20) #generate a random network with 20 nodes
bet <- betweenness(net) #calculate betweenness scores
gplot(net) #a simple plot
gplot(net, vertex.cex = bet/3) #nodes scaled according to their betweenness centrality, the measure is divided by 3 so the nodes don't become to big.
gplot(net, vertex.cex = bet/3, mode = "circle") #with a circle layout
gplot(net, vertex.cex = bet/3, mode = "circle", label = 1:20) #with node labels