Hi there,
I am trying to calculate the number of components for 43 networks under the 43cc directory. Here is my code:
------------------------------------------------
library(igraph)
get.pc <- function(file){
g<-read.graph("file", format="ncol")
cc_all<-decompose.graph(g,min.vertices=2)
aa=length(cc_all)
}
fileList <- list.files(path="43cc", pattern=".txt")
lapply(fileList,get.pc)
----------------------------------------------------
I got the following error:
Error in .Call("R_igraph_read_graph_ncol", file, as.character(predef), :
At rinterface.c:4923 : Cannot read edgelist, File operation error