View source: R/calculate_metrics.R
calculate_metrics | R Documentation |
calculate_metrics calculates for each edgelist in a list of edgelists the following network-level metrics: number of nodes, leading eigenvector modularity, weighted distance, weighted diameter, generalized clustering coefficient, and eigenvector centralization.
calculate_metrics(emp_el)
emp_el |
a list of matrices generated by the function import_emp(), with each matrix representing an augmented edgelist where the first two columns indicate the sending and receiving node of a tie, respectively, the third column indicates the tie weight, the first element of the fourth column indicates the number of nodes in the network, and the first element of the fifth column indicates the number of ties in the network. |
a dataframe of network metrics, where each row represents an edgelist fed into the function, and the first column represents the index of those edgelists. Columns 2-7 represent (in this order): number of nodes, leading eigenvector modularity, weighted distance, weighted diameter, generalized clustering coefficient, and eigenvector centralization of each network.
emp_el_w <- readRDS("./data/Effective_el_emp_w")
weighted_metrics <- calculate_metrics(emp_el_w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.