as_long_data_frame | R Documentation |
A long data frame contains all metadata about both the vertices
and edges of the graph. It contains one row for each edge, and
all metadata about that edge and its incident vertices are included
in that row. The names of the columns that contain the metadata
of the incident vertices are prefixed with from_
and to_
.
The first two columns are always named from
and to
and
they contain the numeric ids of the incident vertices. The rows are
listed in the order of numeric vertex ids.
as_long_data_frame(graph)
graph |
Input graph |
A long data frame.
Other conversion:
as.directed()
,
as.matrix.igraph()
,
as_adj_list()
,
as_adjacency_matrix()
,
as_data_frame()
,
as_edgelist()
,
as_graphnel()
,
as_incidence_matrix()
,
graph_from_adj_list()
,
graph_from_graphnel()
g <- make_(
ring(10),
with_vertex_(name = letters[1:10], color = "red"),
with_edge_(weight = 1:10, color = "green")
)
as_long_data_frame(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.