# Get network
network <- network.estimation(wmt2[,7:24])
# Apply Walktrap
network_walktrap <- community.detection(
network, algorithm = "walktrap"
)
# Apply Louvain
network_louvain <- community.detection(
network, algorithm = "louvain"
)
# Homogenize toward Walktrap
community.homogenize(network_walktrap, network_louvain)
Run the code above in your browser using DataLab