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 #251.

Signed-off-by: Maximilian Löffler <s8maloef@stud.uni-saarland.de>
  • Loading branch information
MaLoefUDS committed Mar 7, 2024
1 parent a34b5bd commit 3451641
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 3451641

Please sign in to comment.