# NOT RUN {
# 1) generate a random bipartite graph
set.seed(123)
g <- sample_bipartite(50, 20, p=0.1)
V(g)$name <- paste0('node_',1:vcount(g))
# }
# NOT RUN {
# 2) obtain its community
ig <- xBigraph(g)
# 3) HEB visualisation
library(ggraph)
E(ig)$weight <- runif(ecount(ig))
gp <- xHEB(ig)
# }
Run the code above in your browser using DataLab