File: write_graph.Rd

package info (click to toggle)
r-cran-igraph 1.0.1-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 18,160 kB
  • sloc: ansic: 173,529; cpp: 19,365; fortran: 4,550; yacc: 1,164; tcl: 931; lex: 484; makefile: 149; sh: 9
file content (53 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/foreign.R
\name{write_graph}
\alias{write.graph}
\alias{write_graph}
\title{Writing the graph to a file in some format}
\usage{
write_graph(graph, file, format = c("edgelist", "pajek", "ncol", "lgl",
  "graphml", "dimacs", "gml", "dot", "leda"), ...)
}
\arguments{
\item{graph}{The graph to export.}

\item{file}{A connection or a string giving the file name to write the graph
to.}

\item{format}{Character string giving the file format. Right now
\code{pajek}, \code{graphml}, \code{dot}, \code{gml}, \code{edgelist},
\code{lgl}, \code{ncol} and \code{dimacs} are implemented. As of igraph 0.4
this argument is case insensitive.}

\item{\dots}{Other, format specific arguments, see below.}
}
\value{
A NULL, invisibly.
}
\description{
\code{write_graph} is a general function for exporting graphs to foreign
file formats, however not many formats are implemented right now.
}
\section{Edge list format}{
 The \code{edgelist} format is a simple text file,
with one edge in a line, the two vertex ids separated by a space character.
The file is sorted by the first and the second column. This format has no
additional arguments.
}
\examples{
g <- make_ring(10)
\dontrun{write_graph(g, "/tmp/g.txt", "edgelist")}
}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}
}
\references{
Adai AT, Date SV, Wieland S, Marcotte EM. LGL: creating a map of
protein function with an algorithm for visualizing very large biological
networks. \emph{J Mol Biol.} 2004 Jun 25;340(1):179-90.
}
\seealso{
\code{\link{read_graph}}
}
\keyword{graphs}