the function of 'buildMultilayerNetworkFromMuxvizFiles' lack of definition of layerEdges
wyc618 opened this issue · 3 comments
I met the same error
I add a line in the package, and then it works:
find the function in the package:
buildMultilayerNetworkFromMuxvizFiles <-
function(config.file,
isDirected,
isWeighted,
MultisliceType,
LayerCouplingStrength = 1,
format = "muxviz edge-colored",
verbose = T)
and add : layerEdges <- list()
before this part:
for (l in 1:Layers) {
if (verbose)
cat(paste(" Reading layer from file", df.config$layers.file, "...\n"))
if (ncol(mEdges) == 5) {
layerEdges[[l]] <- mEdges[mEdges[, 2] == l & mEdges[, 4] == l, c(1, 3, 5)]
} else {
layerEdges[[l]] <- mEdges[mEdges[, 2] == l & mEdges[, 4] == l, c(1, 3)]
}
if (ncol(layerEdges[[l]]) == 3) {
colnames(layerEdges[[l]]) <- c("from", "to", "weight")
if (!isWeighted) {
cat(
paste(
" WARNING! You asked for an unweighted network but weights are found. Assigning 1 by default.\n"
)
)
layerEdges[[l]]$weight <- 1
}
In my case, I get the message :
"Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'data/jurua/jurua_layout.txt': No such file or directory"
The directory is correct and such de layout file seems to be.
Any help would be highly appreciated.
Thanks!!