add_edges_from_df {DiagrammeR} | R Documentation |
Add edges and their attributes to an existing graph object from data in a data frame.
add_edges_from_df(graph, df, from_col, from_attr, to_col, to_attr, set_rel = NULL, select_cols = NULL, drop_cols = NULL, rename_attrs = NULL, rel_col = NULL)
graph |
a graph object of class |
df |
the name of the data frame object. |
from_col |
the name of the data frame column from which edges originate. |
from_attr |
the mapping of |
to_col |
to_col the name of the data frame column to which edges terminate. |
to_attr |
the mapping of |
set_rel |
an optional string to apply a |
select_cols |
an optional character vector for specifying which columns in the data frame should be imported as edge attributes. |
drop_cols |
an optional character vector for dropping columns from the incoming data. |
rename_attrs |
an optional character vector for renaming edge attributes. |
rel_col |
an option to apply a column of data in the data frame as
|
a graph object of class dgr_graph
.