The first argument is the network (in the `igraph` class).
The second argument, for the `by` parameter, is a character vector to indicate one or more vertex attributes based on which the edges are aggregated.
Optionally, the `by` parameter can also be specified separately for `by_from` and `by_to`.
By default, the function returns the aggregated network as an igraph class.
The edges in the aggregated network have five standard attributes.
The `edges` attribute counts the number of edges from the `from` group to the `to` group.
The `from.V` attribute shows the number of vertices in the `from` group that matched with a vertex in the `to` group.
The `from.Vprop attribute shows this as the proportion of all vertices in the `from` group.
The `to.V` and `to.Vprop` attributes show the same for the `to` group.
In addition, one of the edge attributes of the original network can be aggregated with a given function.
These are specified in the `edge_attribute` and `agg_FUN` parameters.