# Dropped Edge Attributes after Union?

**URL:** <https://igraph.discourse.group/t/dropped-edge-attributes-after-union/313>\
**Category:** Usage\
**Tags:** R\
**Created:** [26 June 2020 19:39 UTC](https://igraph.discourse.group/t/dropped-edge-attributes-after-union/313 "2020-06-26T19:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hwong](https://avatars.discourse-cdn.com/v4/letter/h/439d5e/32.png) [@hwong](https://igraph.discourse.group/u/hwong)\
**Post date:** [26 June 2020 19:39 UTC](https://igraph.discourse.group/t/dropped-edge-attributes-after-union/313/1 "2020-06-26T19:39:07Z")

</div>

I have multiple graphs on the same population, all of which have an edge weight of 1. I would like to take a union of these graphs, and have the final edge weight be the sum of each individual edge. ex) if A -\> B in bl\_G09 and bl\_G24, I’d like the edge weight to be 2. However, when I query `E(bl_pers_receive())$weight_i`, `NULL` is returned. Is there a reason why the edge attributes of the other graphs have been dropped?

Here is how I have defined `bl_pers_receive()`.

```auto
bl_pers_receive <- function() {
  W <- weightedbl_G08 %u% weightedbl_G04 %u%
       weightedbl_G06 %u% weightedbl_G01 %u% 
       weightedbl_G09 %u% weightedbl_G24_1 %u% 
       weightedbl_G24_2 %u% weightedbl_G24_3
  V(W)$T <- V(W)$T_1
  V(W)$color <- V(W)$color_1
  W <- sg(W)
  return(W)
}

```

Here is the output when I query `bl_pers_receive`.

```auto
IGRAPH 55a874b DN-- 1508 12205 -- 
+ attr: T_1 (v/n), T_2 (v/n), color_1 (v/c), color_2
| (v/c), name (v/c), T (v/n), color (v/c), weight_1
| (e/n), weight_2 (e/n)
+ edges from 55a874b (vertex names):
 [1] 1211->1219 1211->1240 1211->1241 1211->1632 1212->1217
 [6] 1212->1233 1212->1242 1212->1285 1212->1308 1212->1363
[11] 1212->1376 1213->1231 1213->1239 1213->1292 1213->1304
[16] 1213->1389 1213->1592 1213->1601 1214->1217 1214->1229
[21] 1214->1245 1214->1249 1214->1255 1214->1256 1215->1217
[26] 1215->1218 1215->1219 1215->1240 1215->1241 1215->1242
+ ... omitted several edges

```
