Usage
add_edges_from_table(graph, table, from_col, from_mapping = NULL, to_col, to_mapping = NULL, set_rel = NULL, select_cols = NULL, drop_cols = NULL, rename_attrs = NULL, rel_col = NULL)
Arguments
graph
a graph object of class
dgr_graph that is created using
create_graph.
table
either a path to a CSV file, or, a data
frame object.
from_col
the name of the table column from
which edges originate.
from_mapping
a single character value for
the mapping of a column in the external table
(supplied as from_col) to a column in the
graph's internal node data frame (ndf).
to_col
the name of the table column to
which edges terminate.
to_mapping
a single character value for
the mapping of a column in the external table
(supplied as to_col) to a column in the
graph's internal node data frame (ndf).
set_rel
an optional string to apply a
rel attribute to all edges created from the
table records.
select_cols
an optional character vector for
specifying which columns in the table that 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 table as rel attribute values.