add_edges_from_csv {DiagrammeR} | R Documentation |
Add edges and their attributes to an existing graph object from data in a CSV file.
add_edges_from_csv(graph, csv_path, 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 |
csv_path |
a path to a CSV file. |
from_col |
the name of the CSV column from which edges originate. |
from_attr |
the mapping of |
to_col |
to_col the name of the CSV 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 CSV file 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 CSV file
as |
a graph object of class dgr_graph
.