From 6e9c2c3f68153de600d7a35f6e569d6c5d1938dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20L=C3=B6ffler?= Date: Wed, 28 Feb 2024 18:33:17 +0100 Subject: [PATCH] Correctly obtain the unique relation sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the 'relation' edge-attribute potentially holds a list of relation sources, it needs to be unlisted first before it can be disambiguated. This works towards #251. Signed-off-by: Maximilian Löffler --- util-networks.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-networks.R b/util-networks.R index 94cbeec3..f7f7ddf9 100644 --- a/util-networks.R +++ b/util-networks.R @@ -1788,7 +1788,7 @@ delete.authors.without.specific.edges = function(network, specific.edge.types = #' empty relation, i.e. \code{character(0)} get.data.sources.from.relations = function(network) { ## get all relations in the network - data.sources = unique(igraph::E(network)$relation) + data.sources = unique(unlist(igraph::E(network)$relation)) ## map them to data sources respectively using the defined translation constant data.sources = sapply(data.sources, function(relation) {