Skip to content

Commit

Permalink
Fix get.expanded.adjacency.matrices
Browse files Browse the repository at this point in the history
to have correct column- and rownames in the returned matrices

Signed-off by: Leo Sendelbach <s8lesend@stud.uni-saarland.de>
  • Loading branch information
Leo-Send committed Jan 9, 2024
1 parent ff59017 commit e72eff8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions util-networks-misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ get.expanded.adjacency = function(network, authors, weighted = FALSE) {
#' @return the list of adjacency matrices
get.expanded.adjacency.matrices = function(networks, weighted = FALSE){

authors = get.author.names.from.networks(networks)

adjacency.matrices = parallel::mclapply(networks, get.expanded.adjacency, authors, weighted)
adjacency.matrices = parallel::mclapply(networks, function(network) {
active.authors = igraph::V(network)$name
active.authors = sort(active.authors)
return (get.expanded.adjacency(network = network, authors = active.authors, weighted = weighted))
})

return(adjacency.matrices)
}
Expand Down

0 comments on commit e72eff8

Please sign in to comment.