as_long_data_frame: Convert a graph to a long data frame

Description Usage Arguments Value Examples

Description

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.

Usage

1

Arguments

graph

Input graph

Value

A long data frame.

Examples

1
2
3
4
5
g <- make_(ring(10),
        with_vertex_(name = letters[1:10], color = "red"),
        with_edge_(weight = 1:10, color = "green")
      )
as_long_data_frame(g)


Search within the igraph package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.