This commit is contained in:
hyginn 2021-09-15 20:12:10 -04:00
parent 02ea110fe2
commit 6714171102

View File

@ -190,7 +190,7 @@ BC <- igraph::centr_betw(gSTR)
# remember: BC$res contains the results # remember: BC$res contains the results
head(BC$res) head(BC$res)
BC$res[1] # betweeness centrality of node 1 in the graph ... BC$res[1] # betweenness centrality of node 1 in the graph ...
# ... which one is node 1? # ... which one is node 1?
igraph::V(gSTR)[1] igraph::V(gSTR)[1]
@ -202,7 +202,7 @@ names(BC$res) <- as.character(1:length(BC$res))
sBC <- sort(BC$res, decreasing = TRUE) sBC <- sort(BC$res, decreasing = TRUE)
head(sBC) head(sBC)
# This ordered vector means: node 3 has the highest betweeness centrality, # This ordered vector means: node 3 has the highest betweenness centrality,
# node 721 has the second highest, etc. # node 721 has the second highest, etc.
(BCsel <- as.numeric(names(sBC)[1:10])) (BCsel <- as.numeric(names(sBC)[1:10]))