graph_metrics: Analyses metrics of an iGraph object

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

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

Usage

1
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

1
2
3
adj_mat <- matrix(rnorm(36),nrow=6)
graph <- igraph::graph_from_adjacency_matrix(adj_mat)
graph_metrics(graph, verbose = TRUE, return = FALSE)

molnet-org/molnet documentation built on Dec. 21, 2021, 8:59 p.m.