[Top][All Lists]

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

[igraph] Re: Gabor, could help me out of this

From: Gábor Csárdi
Subject: [igraph] Re: Gabor, could help me out of this
Date: Sat, 29 Nov 2008 20:37:03 +0100

Hi Lani, I think the problem is the 'name' vertex attribute, not the
'weight' edge attribute. This is a known bug. A workaround is to
temporarily remove the 'name' vertex attribute:

A <- get.adjacency( remove.vertex.attribute(g, "name"), sparse=TRUE,
attr="weight" )

I hope this helps,

On Sat, Nov 29, 2008 at 6:20 AM, lan gao <address@hidden> wrote:
> Gabor,
>         Sorry to bother you. I have trouble with the following...
>          I read a graph data into R from a text file. The graph is a
> weighted graph with more than 6000 nodes. This is the summary of the graph:
> summary(g)
> Vertices: 6905
> Edges: 7965
> Directed: FALSE
> No graph attributes.
> Vertex attributes: name.
> Edge attributes: weight.
> Then I need to get the adjacency matrix of the graph. and I use
> A<-get.adjacency(g, sparse=TRUE, attr="weight")  ( I need to store this huge
> matrix as sparse matrix otherwise it will cause a memroy problem).
> Then it comes the error "Error in pmin(el[, 1], el[, 2]) + 1 : non-numeric
> argument to binary operator ".
> I can successful use A<-get.adjacency(g0, sparse=TRUE) before to test a huge
> random graph g0 generated by "barabarsi.game". . But the same command does
> not work for
> the read in weighted graph.
> I could not figure out the problem, could you please help me out?
> Thanks tons!
> lani

Gabor Csardi <address@hidden>     UNIL DGM

reply via email to

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