Use format="ncol"; the NCOL format is similar to the edge list format but it
also supports weights.
Note, however, that the NCOL format treats the first two columns as a
_symbolic_ edge list, which means that the vertex identifiers in the first two
column will be assigned to the "name" vertex attribute (V(g)$name in R), and
the vertex ids will be assigned to the vertex names in the order of appearance.
--
T.
On Tuesday, 10 April 2012 at 18:43, Ish Rattan wrote:
>
> I want to read in a digraph from a file with format of one edge per line
> as:
> tail-vertex head-vertex edge-weight
>
> I know about read.graph("file", format="edgelist") but what argument is
> needed to readin the wieghts? I did try the documentation..
>
> -ishwar
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected] (mailto:[email protected])
> https://lists.nongnu.org/mailman/listinfo/igraph-help
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help