Skip to content

Commit

Permalink
Correctly obtain the unique relation sources
Browse files Browse the repository at this point in the history
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 se-sic#251.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
  • Loading branch information
maxloeffler committed Feb 28, 2024
1 parent 7295958 commit 6e9c2c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util-networks.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e9c2c3

Please sign in to comment.