Description Usage Arguments Value References Examples
Centrality is a core concept in studying the topological structure of
complex networks, which can be either defined for each node or edge.
nd.centrality
offers 3 distance measures on node-defined centralities.
See this Wikipedia page for more
on network/graph centrality.
1 2 3 4 5 6 | nd.centrality(
A,
out.dist = TRUE,
mode = c("Degree", "Close", "Between"),
directed = FALSE
)
|
A |
a list of length N containing (M\times M) adjacency matrices. |
out.dist |
a logical; |
mode |
type of node centrality definitions to be used. |
directed |
a logical; |
a named list containing
an (N\times N) matrix or dist
object containing pairwise distance measures.
an (N\times M) matrix where rows are node centralities for each graph.
roy_modeling_2014NetworkDistance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## load example data
data(graph20)
## use 3 types of centrality measures
out1 <- nd.centrality(graph20, out.dist=FALSE,mode="Degree")
out2 <- nd.centrality(graph20, out.dist=FALSE,mode="Close")
out3 <- nd.centrality(graph20, out.dist=FALSE,mode="Between")
## visualize
opar = par(no.readonly=TRUE)
par(mfrow=c(1,3), pty="s")
image(out1$D[,20:1], main="Degree", col=gray(0:32/32), axes=FALSE)
image(out2$D[,20:1], main="Close", col=gray(0:32/32), axes=FALSE)
image(out3$D[,20:1], main="Between", col=gray(0:32/32), axes=FALSE)
par(opar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.