NetStats {CoNI} | R Documentation |
Network Statistics
Description
This function calculates simple network statistics and returns them as a dataframe
Usage
NetStats(Network)
Arguments
Network |
An Igraph network |
Value
Returns a data.frame with nine rows with the following network statistics:
"net_avg_pathL"Shortest paths between vertices
"net_edge_density"Graph density, ratio of the number of edges and the number of possible edges
"net_transitivity"Probability that the adjacent vertices of a vertex are connected
"net_diameter"Length of the longest geodesic
"net_nodes_first_path_diameter"The nodes along the first found path with the length of diameter
"net_eigenvalue"The eigenvalue corresponding to the centrality scores.
"net_centralized_betweenessIdx"The graph level centrality index after centralizing the graph according to the betweenness of vertices
"net_centralized_closenessIdx"The graph level centrality index after centralizing the graph according to the closeness of vertices
"net_centralized_degreeIdx"The graph level centrality index after centralizing the graph according to the degrees of vertices
For more information on the statistics consult the igraph package.
Examples
#Load color nodes table
data(MetColorTable)
#Assign colors according to "Class" column
MetColorTable<-assign_colorsAnnotation(MetColorTable)
#Load CoNI results
data(CoNIResultsHFDToy)
#Generate Network
HFDNetwork<-generate_network(ResultsCoNI = CoNIResultsHFDToy,
colorVertexNetwork = TRUE,
colorVertexTable = MetColorTable,
outputDir = "./",
outputFileName = "HFD",
saveFiles = FALSE)
NetStats(HFDNetwork)