make_edges.Rd
Calculates weightings between nodes for a network diagram.
make_edges(
connections_data,
node_id,
node_number,
connection_id,
join_col = deparse(substitute(connection_id)),
from_to_col = NULL,
weight_col = NULL,
weight_col_fun = NULL,
...
)
Dataframe detailing connections between nodes, as generated via make_connections()
. This can have duplicate rows for node - connection object combinations, to account for how edge weighting should be handled.
Original ID (can be character) for each node as per source dataframe.
Numeric ID for each node - can be generated as per make_connections()
.
Field to connect related nodes as per initial source data.
Column (as character string) to join connections data back onto itself. Defaults to the connection_id
field.
Column (character string "from" or "to") use in determining which is from node and which is to node. You need to pre-define this column if you want to use the functionality. If not provided, which node is selected as from and to will depend on the node_number
.
Column used to set edge weights. If not set, a count of unique connecting objects between nodes will be used.
Function to apply to weight_col()
data to get edges.
Additional arguments to pass to weight_col_fun()
.
A dataframe containing details of vertices between nodes, including weights. Note this will have unique rows for each node-to-node combination.