Learn R Programming

molnet (version 0.1.0)

graph_metrics: Analyses metrics of an iGraph object

Description

This helper function prints or returns multiple metrics of arbitrary iGraph graph object.

Usage

graph_metrics(graph, verbose = TRUE, return = FALSE)

Arguments

graph

iGraph object to analyze.

verbose

If TRUE graph information is printed.

return

If TRUE graph information is returned from function.

Value

Named list of metrics including vertex count, edge count, number of components, size of largest component and the relative frequency of zero degree vertices.

Examples

Run this code
# NOT RUN {
adj_mat <- matrix(rnorm(36),nrow=6)
graph <- igraph::graph_from_adjacency_matrix(adj_mat)
graph_metrics(graph, verbose = TRUE, return = FALSE)


# }

Run the code above in your browser using DataLab