add_nodes_from_csv {DiagrammeR} | R Documentation |
Add nodes and their attributes to an existing graph object from data in a CSV file.
add_nodes_from_csv(graph, csv_path, set_type = NULL, select_cols = NULL, drop_cols = NULL, rename_attrs = NULL, id_col = NULL, type_col = NULL, label_col = NULL)
graph |
a graph object of class |
csv_path |
a path to a CSV file. |
set_type |
an optional string to apply a |
select_cols |
an optional character vector for specifying which columns in the CSV file should be imported as node attributes. |
drop_cols |
an optional character vector for dropping columns from the incoming data. |
rename_attrs |
an optional character for renaming node attributes. |
id_col |
an option to apply a column of data in the CSV file as node ID values. |
type_col |
an option to apply a column of data in the CSV file
as |
label_col |
an option to apply a column of data in the CSV file
as |
a graph object of class dgr_graph
.