| aggregate_duplicate_edges | R Documentation |
Combines duplicate edges by aggregating their weights using a specified function (sum, mean, max, min, or first).
aggregate_duplicate_edges(edges, method = "mean")
edges |
Data frame with |
method |
Aggregation method: |
Total weight of all duplicate edges. Useful for frequency counts or when edges represent additive quantities (e.g., number of emails).
Average weight. Useful for averaging multiple measurements or when duplicates represent repeated observations.
Maximum weight. Useful for finding the strongest connection or most recent value.
Minimum weight. Useful for the most conservative estimate or earliest value.
Keep first occurrence. Useful for preserving original order or when duplicates are erroneous.
The output edge list uses canonical node ordering (lower index first for undirected networks), ensuring consistent from/to assignment.
A deduplicated data frame with the same columns as the input, where each node pair appears only once with its aggregated weight.
detect_duplicate_edges for identifying duplicates before
aggregation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.