Hi,
Thank you Gabor,
Please consider this example , with the attached file :

               karate3=read.csv(file.choose(), header=TRUE,
stringsAsFactors=FALSE,as.is=TRUE)
               karate3[,1]=as.numeric(as.character(karate3[,1]))
               karate3[,2]=as.numeric(as.character(karate3[,2]))
               E(karate3)$weight <- 5

> karate3
IGRAPH UNW- 26 31 --
+ attr: name (v/c), weight (e/n)

              graph_simplify=simplify(karate3,remove.multiple =
TRUE,edge.attr.comb=list(Weight="mean"))

> graph_simplify
IGRAPH UNW- 26 29 --
+ attr: name (v/c), weight (e/x)

> sum(E(karate3)$weight)
[1] 155
> sum(E(graph_simplify)$weight)
[1] 0


Regards,
Fatemeh

On Sat, Dec 6, 2014 at 5:18 PM, Gábor Csárdi <[email protected]> wrote:

> Hi, we need a complete reproducible example to be able to help you.
>
> Gabor
>
> On Sat, Dec 6, 2014 at 6:54 AM, Fatemeh a <[email protected]> wrote:
>
>> Hi,
>>
>> I was wondering how could I resolve this issue :
>> after using
>>   graph_simplify=simplify(graph,remove.multiple =
>> TRUE,edge.attr.comb=list(Weight="mean"))
>> and the type of the edge attribute weight
>> change from n(numeric) to x(other) and when i execute
>> sum(E(graph)$weight) , I got zero , how should I change the x type
>> attribute to numeric one ?
>>
>> thank you in advance,
>>
>> --
>> regards
>> F..A
>>
>> _______________________________________________
>> igraph-help mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>


-- 
regards
F..A
id1,id2
1,17
2,1
2,32
2,5
3,1
3,33
3,30
3,33
3,21
4,3
4,25
4,10
5,18
7,6
8,4
11,1
11,6
13,1
13,4
14,4
14,4
14,5
15,7
17,7
18,2
20,1
24,12
26,1
31,2
32,1
33,19
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to