read.graph {igraph}R Documentation

Reading foreign file formats

Description

The read.graph function is able to read graphs in various representations from a file, or from a http connection. Currently some simple formats are supported.

Usage

read.graph(file, format = c("edgelist", "pajek", "ncol", "lgl",
        "graphml", "dimacs", "graphdb", "gml"), ...)

Arguments

file The connection to read from. This can be a local file, or a http or ftp connection. It can also be a character string with the file name or URI.
format Character constant giving the file format. Right now edgelist, pajek, graphml, gml, ncol, lgl, dimacs and graphdb are supported, the default is edgelist. As of igraph 0.4 this argument is case insensitive.
... Additional arguments, see below.

Details

The read.graph function may have additional arguments depending on the file format (the format argument).

Value

A graph object.

Author(s)

Gabor Csardi csardi@rmki.kfki.hu

See Also

write.graph


[Package igraph version 0.5.2 Index]