Hi, I have a 500x 53380 sparse matrix and I am trying to dichotomize it. Under sna package I have found event2dichot yet it doesnt recognize sparse matrix and requires adjacency matrix or array. I tried to run a simple loop code
for (i in 1:500) for (j in 1:53380) if (matrix[i,j]>0) matrix[i,j]=1 yet this takes a lot of time to run, I mean it has been last two hours and it is stil running. I am wondering if there is a shortcut or a hack here someone can recommend. thanks all. -- View this message in context: http://r.789695.n4.nabble.com/working-with-sparse-matrix-tp3614117p3614117.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.