有关图集中化的摘要,请参见centralize()
。
用法
centr_degree_tmax(
graph = NULL,
nodes = 0,
mode = c("all", "out", "in", "total"),
loops
)
参数
- graph
输入图。如果给出了
nodes
,也可以为NULL
。- 节点
顶点数。如果给出了图,则忽略此项。
- mode
与
degree()
的mode
参数相同。如果提供了graph
且图是无向图,则忽略此参数。- loops
逻辑标量,指示在计算度时是否考虑自环边。
参见
其他中心性相关函数: centr_betw()
, centr_betw_tmax()
, centr_clo()
, centr_clo_tmax()
, centr_degree()
, centr_eigen()
, centr_eigen_tmax()
, centralize()
示例
# A BA graph is quite centralized
g <- sample_pa(1000, m = 4)
centr_degree(g, normalized = FALSE)$centralization %>%
`/`(centr_degree_tmax(g, loops = FALSE))
#> [1] 0.1459476
centr_degree(g, normalized = TRUE)$centralization
#> [1] 0.1458015