igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] read inputs from adjacency matrix


From: WM Oxbury
Subject: Re: [igraph] read inputs from adjacency matrix
Date: Fri, 22 May 2009 16:53:44 +0100

In R, I have found the following a convenient way to convert miscellaneous formats. This example takes any number of whitespace- separated columns and picks out the relevant ones for reading into "ncol" format:

pipe.graph = function(x, col1, col2){
  read.graph(
             pipe(sprintf("cut -f%d,%d -d' ' %s", col1, col2, x)),
             format="ncol"
             )
}

But the point is that you can replace the string in the pipe() function with any (unix) command-line preformatting - I've used various variations on this.

Don't know if that's any help for your problem.

Bill.



On 22 May 2009, at 13:36, Gábor Csárdi wrote:

Pankay, using R, Python or C?

Gabor

On Fri, May 22, 2009 at 2:17 PM, pankaj borah
<address@hidden> wrote:
Dear all ,

I am just wondering if there is a way to read inputs from adjacency matrix . I am using igraph module. I want to directly load the input as adjacency
instead of reading as edgelist or pajek format. Can anypne help ?

Thanks ,

Pankaj Barah
Mathematical modelling & Computational Biology Group
Centre for Cellular & Molecular Biology
Uppal Road, Hyderabad 500 007, AP, India


________________________________
Explore and discover exciting holidays and getaways with Yahoo! India Travel
Click here!
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





--
Gabor Csardi <address@hidden>     UNIL DGM


_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help





reply via email to

[Prev in Thread] Current Thread [Next in Thread]