make_edges | R Documentation |
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,
...
)
connections_data |
Dataframe detailing connections between nodes, as generated via |
node_id |
Original ID (can be character) for each node as per source dataframe. |
node_number |
Numeric ID for each node - can be generated as per |
connection_id |
Field to connect related nodes as per initial source data. |
join_col |
Column (as character string) to join connections data back onto itself. Defaults to the |
from_to_col |
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 |
weight_col |
Column used to set edge weights. If not set, a count of unique connecting objects between nodes will be used. |
weight_col_fun |
Function to apply to |
... |
Additional arguments to pass to |
A dataframe containing details of vertices between nodes, including weights. Note this will have unique rows for each node-to-node combination.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.