# NOT RUN {
# 1) generate a random bipartite graph
set.seed(123)
g <- sample_bipartite(100, 50, p=0.1)
V(g)$name <- V(g)
# }
# NOT RUN {
# 2) obtain and append the community
cs <- igraph::cluster_louvain(g)
V(g)$community <- cs$membership
ls_ig <- xGraphSplit(g, node.attr="community")
# }
Run the code above in your browser using DataLab