Raphael Prates
2016-Mar-09 00:21 UTC
[R] QuACN package: getLargestSubgraph -> .validateGraph error
I am trying to create a network from the matrix that is attached.> matrixSelecionada <- read.csv("matrix.csv", header = FALSE)> matrixSelecionada <- data.matrix(matrixSelecionada)## changing the values of the matrix> for (i in 1:nrow(matrixSelecionada)) {for (j in 1:ncol(matrixSelecionada)) { if (matrixSelecionada[i,j] < 0.01 || i==j) { matrixSelecionada[i,j] <- 0 } else if (matrixSelecionada[i,j]>=0.01) { matrixSelecionada[i,j] <- 1 } } }> g <- as(matrixSelecionada, "graphNEL") > gA graphNEL graph with directed edges Number of Nodes = 56 Number of Edges = 1256> glg <- getLargestSubgraph(g)Error: .validateGraph(g) is not TRUE But when I do validateGraph> validGraph(g)[1] TRUE