igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] adding a new edge attribute with 1 or more zero values dele


From: Gábor Csárdi
Subject: Re: [igraph] adding a new edge attribute with 1 or more zero values deletes all edges
Date: Wed, 31 Oct 2012 12:47:42 -0400

On Wed, Oct 31, 2012 at 12:32 PM, Tony Larson <address@hidden> wrote:
> Thanks Gabor,
> That's helpful.
>
> However, another problem I've run across is setting edge attributes.  If I
> add a new numeric edge attribute with a value of  0 for ANY edge (or all,
> edges but a single 0 is enough), ALL edges are deleted!

Probably this is a bug, I'll investigate it. Can't you just set all
values of the edge attribute at once, using

E(g)$rtval <- rtval

as a workaround?

Btw. it would be great to have some self-contained code that
reproduces the problem, in the questions sent to the list, because
otherwise it takes nine minutes for me to create some reasonable fake
data, and then one minute to answer the question. Sometimes I have one
minute to answer a question, but don't have ten minutes.

I am sorry to bring this up now in this email, it is a rather general
suggestion.

More soon. G.

>  I've made a
> workaround by adding a constant positive integer value (e.g. 1) using the
> g[from = , to  = ] method, then replacing with the correct values using
> E(g)$attribute <- . But obviously something odd is going on. Am I missing
> something in how to add an edge attribute? See below.
>
>
[...]



reply via email to

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