Extract an edge attribute.
edge_get_attr(.net, .edge_attr, .edge_index = edge_seq(.net)) # S3 method for igraph edge_get_attr(.net, .edge_attr, .edge_index = edge_seq(.net)) # S3 method for network edge_get_attr(.net, .edge_attr, .edge_index = edge_seq(.net))
.net | network of class |
---|---|
.edge_attr |
|
.edge_index |
|
vector
(typically)
edge_get_attr(.net = florence_business_ig, .edge_attr = "edge_type")#> [1] "business" "business" "business" "business" "business" "business" #> [7] "business" "business" "business" "business" "business" "business" #> [13] "business" "business" "business" "business" "business" "business" #> [19] "business" "business" "business" "business" "business" "business" #> [25] "business" "business" "business" "business" "business" "business"florence_marriage_nw %>% edge_get_attr(.edge_attr = "edge_type")#> [1] "marital" "marital" "marital" "marital" "marital" "marital" "marital" #> [8] "marital" "marital" "marital" "marital" "marital" "marital" "marital" #> [15] "marital" "marital" "marital" "marital" "marital" "marital" "marital" #> [22] "marital" "marital" "marital" "marital" "marital" "marital" "marital" #> [29] "marital" "marital" "marital" "marital" "marital" "marital" "marital" #> [36] "marital" "marital" "marital" "marital" "marital"florence_marriage_nw %>% edge_get_attr(.edge_attr = "edge_type", .edge_index = 1:5)#> [1] "marital" "marital" "marital" "marital" "marital"