[R] How to create a high-dimensional matrix

lrl liurl1221 at gmail.com
Tue Oct 16 21:46:22 CEST 2012


Hi, everyone

I need to create a 429497 x 429497 matrix. 
When I use
*matrix(0,429497,429497)*
I got the error information :  Error in matrix(0, 429497, 429497) : too many
elements specified

Then I use "ff" package, try to store this matrix on disk
* x<-ff(0,dim=c(429497,429497)*
And I got the error information : 
Error in if (length < 0 || length > .Machine$integer.max) stop("length must
be between 1 and .Machine$integer.max") : 
  missing value where TRUE/FALSE needed
In addition: Warning message:
In ff(0, dim = c(429497, 429497)) : NAs introduced by coercion

I am using Unix. The free memory is about 33G
> .Machine$integer.max
[1] 2147483647

What can I do the create such a high dimension matrix?

Many thanks!

Ruiling Liu




--
View this message in context: http://r.789695.n4.nabble.com/How-to-create-a-high-dimensional-matrix-tp4646396.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list