% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conversion.R
\name{as_long_data_frame}
\alias{as_long_data_frame}
\title{Convert a graph to a long data frame}
\usage{
as_long_data_frame(graph)
}
\arguments{
\item{graph}{Input graph}
}
\value{
A long data frame.
}
\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 \code{from_} and \code{to_}.
The first two columns are always named \code{from} and \code{to} and
they contain the numeric ids of the incident vertices. The rows are
listed in the order of numeric vertex ids.
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_get_edgelist}{\code{get_edgelist()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}
}

\examples{
g <- make_(
  ring(10),
  with_vertex_(name = letters[1:10], color = "red"),
  with_edge_(weight = 1:10, color = "green")
)
as_long_data_frame(g)
}
\seealso{
Other conversion: 
\code{\link{as.matrix.igraph}()},
\code{\link{as_adj_list}()},
\code{\link{as_adjacency_matrix}()},
\code{\link{as_biadjacency_matrix}()},
\code{\link{as_data_frame}()},
\code{\link{as_directed}()},
\code{\link{as_edgelist}()},
\code{\link{as_graphnel}()},
\code{\link{graph_from_adj_list}()},
\code{\link{graph_from_graphnel}()}
}
\concept{conversion}
