Create a very large Sparse Matrix in R -


i trying create large sparse matrix, 10^5 10^5 in r, running memory issues.

> matrix(nrow=1e5,ncol=1e5,sparse=true) error in matrix(nrow = 1e+05, ncol = 1e+05, sparse = true) :    many elements specified 

it looks because number of elements larger 2^31, maximum integer value. running on 64 bit machine.

> .machine$integer.max [1] 2147483647 

is there way create such large, sparse matrix?

it looks trick set data=0 rather data=na.

> matrix(data=0,nrow=1e5,ncol=1e5,sparse=true) 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -