this is just a random generation method, the module number of result is not exactly the module_number, you can change the inter_module_density and intra_module_density to get the proper result.
module_net(
module_number = 3,
n_node_in_module = 30,
intra_module_density = 0.3,
inter_module_density = 0.01
)
n-modules metanet
Other module:
filter_n_module()
,
get_community()
,
get_module_eigen()
,
get_module()
,
module_detect()
,
module_eigen()
,
summary_module()
,
to_module_net()
,
zp_analyse()
g1 <- module_net()
get_n(g1)
#> communities modularity relative_modularity n_type n_modules
#> 1 3-elements communities 0.604477238341047 1.37887328568458 module 3
plot(g1, mark_module = TRUE)
plot(g1, coors = g_layout(g1, zoom2 = 20))
plot(g1, coors = g_layout_polyarc(g1, group = "module"))
plot(g1, coors = g_layout_polygon(g1, group = "module"))