`as_adjacency_matrix` with `attr` param leads to extremely long (nonterminating?) runtime
What I am trying to do and the problem: I have a very large edgelist. I want to load the edgelist, build the undirected graph described by this edgelist, and save the graph as matrix representation (i.e. full matrix with both triangles and the diagonal, in ASCII). The problem is that the program does not seem to terminate after 14+ hours runtime. An otherwise identical version without attr = "V3" terminates after a few minutes. However I want to have the edge weights in the resulting matrix so I must use attr.
My code:
library(igraph)
df <- read.table("myedgelist.txt", sep="\t")
g <- graph_from_data_frame(df, directed = F)
a <- as_adjacency_matrix(g, type = "both", sparse = F, attr = "V3")
write.table(a, file="mymatrix.txt", row.names=TRUE, col.names=TRUE, sep="\t", quote = F)
I have been monitoring RAM consumption closely, this is not the issue, the machine has 64 GB and I use around 80% of this.
Input file: I have a an edgelist in tab-separated ASCII like this:
alpha beta 0.256 alpha gamma 0.369 delta epsilon 0.658 ...
This edgelist is about ~3.2 GB in size with more than 180.000.000 lies (edges). It represents the lower triangle of a distance matrix.
sessionInfo is attached. sessionInfo.txt