% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/converters.R
\name{to_gephi}
\alias{to_gephi}
\title{Export to Gephi node and edge tables}
\usage{
to_gephi(edges, nodes = NULL, file = NULL, directed = FALSE)
}
\arguments{
\item{edges}{A data frame with at least \code{from}, \code{to}, \code{weight} columns.}

\item{nodes}{Optional data frame of node attributes. Must contain an \code{id}
column. All other columns are included as Gephi node attributes.}

\item{file}{Optional directory path. If supplied, writes \code{nodes.csv} and
\code{edges.csv} into that directory. If \code{NULL} (default), returns a list.}

\item{directed}{Logical. Sets the \code{Type} column. Default \code{FALSE}.}
}
\value{
If \code{file = NULL}: a list with \verb{$nodes} and \verb{$edges} data frames.
If \code{file} is a directory path: writes two CSV files invisibly and returns
the file paths.
}
\description{
Converts a bibnets edge list (and optional node table) to the CSV format
expected by Gephi's Data Laboratory. Column names are remapped to Gephi
conventions (\code{Source}, \code{Target}, \code{Weight}, \code{Id}, \code{Label}).
}
\examples{
data(biblio_data)
edges <- author_network(biblio_data, "collaboration")
gephi <- to_gephi(edges)
head(gephi$edges)
}
