View source: R/analyse-network.R
analyseNetwork | R Documentation |
Generic function for network properties, allowing you to get a quick overview of the network topology.
analyseNetwork(graph)
graph |
An |
The following measurements are calculated in one step using the igraph package to analyze the input graph object: the Degree, Betweenness, Closeness, Kleinberg's hub score and Eigenvector centrality of nodes (vertices), the Betweenness centrality of edges, number of nodes, edges and components, the edge density, global Eigenvector centrality value and global Kleinberg's hub centrality score.
A list containing vertices
and edges
centrality values as well as general_stats
for the whole network.
vcount
, ecount
,
edge_density
, count_components
,
degree
,betweenness
,
edge_betweenness
,closeness
,
eigen_centrality
,hub_score
.
# generate a toy graph
g1 <- igraph::make_graph(c(1, 2, 3, 4, 1, 3), directed = FALSE)
igraph::V(g1)$name <- c("n1", "n2", "n3", "n4")
# generate random graph according to the Erdos-Renyi model
g2 <- igraph::sample_gnm(10, 23)
igraph::V(g2)$name <- letters[1:10]
# run analyseNetwork
analyseNetwork(g1)
analyseNetwork(g2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.