Skip to content

Commit

Permalink
update variable name in format_multiplex_names
Browse files Browse the repository at this point in the history
  • Loading branch information
r-trimbour authored Oct 14, 2023
1 parent 8008e2f commit 1e53bcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/explore_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ format_multiplex_names <- function(

# Check if multiplex_names is NULL
if (is.null(multiplex_names)) {
multiplexes_names <- names(multiplex_list)
multiplex_names <- names(multiplex_list)
}

# Create a named list containing the multiplexes infos
# formatted for hummuspy config funtions
# each element of the list is a list of the network types (weighted/directed)
# and the name of the networks as named in the hummus object
multiplexes_dictionary <- lapply(
hummus_object@multilayer@multiplex[multiplexes_names],
hummus_object@multilayer@multiplex[multiplex_names],
function(x) list(paste0(as.integer(x@weighted), as.integer(x@directed))))

# Add the names of the networks as named in the hummus object
for (multiplex in names(hummus_object@multilayer@multiplex[multiplexes_names])){
for (multiplex in names(hummus_object@multilayer@multiplex[multiplex_names])){
# Check if multiplex exists in hummus object
if (is.null(hummus_object@multilayer@multiplex[[multiplex]])) {
cat("Multiplex ", multiplex, " is NULL\n")
Expand Down Expand Up @@ -610,4 +610,4 @@ define_general_config <- function(
suffix = suffix)

return(config)
}
}

0 comments on commit 1e53bcb

Please sign in to comment.