I am starting to use the package called visNetwork
and I feel like it has a ton of potential for User-Interface use in the future.
There are few things that
Here is a solution. Just build the plain graph with igraph and then make the cosmetic changes using visNetwork:
Code:
i96e = graph.adjacency(g96e, mode = "undirected", weighted = TRUE, diag=FALSE)
fc<-fastgreedy.community(i96e, merges=TRUE, modularity=TRUE,
membership=TRUE, weights=E(i96e)$weight)
library (visNetwork)
dummy <- toVisNetworkData(i96e)
my.edges <- dummy$edges
my.nodes <- dummy$nodes
my.nodes$groups <- fc$membership
my.nodes$color.background <- c("red", "blue", "green" ,"yellow")[my.nodes$groups]
my.nodes$color.border <- c("red", "blue", "green" ,"yellow")[my.nodes$groups]
my.nodes$size = 5
my.edges$color <- "black"
visNetwork(my.nodes, my.edges)%>%
visIgraphLayout()