I have a very large network with 50,000 nodes. It's sparse. I want to find communities in it, using R. How do I do so? Thank you!
(I tried using igraph, but it won't work because the adjacency matrix is too large.)
The dataset looks like this:
1 0 0 1 0 0 0 1
0 1 0 1 0 1 1 0
...
It's 50,000 x 80.
I found the correlation between every row, creating a correlation matrix that looks like this:
0.14 0.26 0.36
0.24 0.79 0.36
...
It's 50,000 x 50,000.
Then I put it into igraph:
output2<-matrix(ifelse(runif(50000*80)<0.2,1,0),50000,80) # random binary sparse matrix
x2 <- graph.adjacency(cor(t(output2)), weighted=TRUE, diag=FALSE)
x2 = delete.vertices(x2,which(degree(x)<1))
x2 = as.undirected(x2)
b2 <- walktrap.community(x2)
k3<-groups(b2)
However, igraph
says it can't create the adjacency graph, as it's too large.