Create an edge data frame
Combine several vectors for edges and their attributes into a data frame, which can be combined with other similarly-generated data frames, or, added to a graph object. An edge data frame, or edf, has at least the following columns:
create_edge_df(from, to, rel = NULL, ...)
from |
A vector of node ID values from which edges are outbound. The
vector length must equal that of the |
to |
A vector of node ID values to which edges are incoming. The vector
length must equal that of the |
rel |
An optional |
... |
One or more vectors for associated edge attributes. |
id
(of type integer
)
from
(of type integer
)
to
(of type integer
)
rel
(of type character
)
An arbitrary number of additional columns containing aesthetic or data attributes can be part of the edf, so long as they follow the aforementioned columns.
An edge data frame (edf).
Other Edge creation and removal:
add_edge_clone()
,
add_edge_df()
,
add_edges_from_table()
,
add_edges_w_string()
,
add_edge()
,
add_forward_edges_ws()
,
add_reverse_edges_ws()
,
copy_edge_attrs()
,
delete_edges_ws()
,
delete_edge()
,
delete_loop_edges_ws()
,
drop_edge_attrs()
,
edge_data()
,
join_edge_attrs()
,
mutate_edge_attrs_ws()
,
mutate_edge_attrs()
,
recode_edge_attrs()
,
rename_edge_attrs()
,
rescale_edge_attrs()
,
rev_edge_dir_ws()
,
rev_edge_dir()
,
set_edge_attr_to_display()
,
set_edge_attrs_ws()
,
set_edge_attrs()
# Create a simple edge data frame (edf) and # view the results edf <- create_edge_df( from = c(1, 2, 3), to = c(4, 3, 1), rel = "a") # Display the edge data frame edf # Create an edf with additional edge # attributes (where their classes will # be inferred from the input vectors) edf <- create_edge_df( from = c(1, 2, 3), to = c(4, 3, 1), rel = "a", length = c(50, 100, 250), color = "green", width = c(1, 5, 2)) # Display the edge data frame edf
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.