[R] Matrix Size

paul s r-project.org at queuemail.com
Thu Jul 15 02:21:38 CEST 2010



On 07/14/2010 06:15 PM, Peter Dalgaard wrote:
> A quick calculation reveals that a matrix of that size requires about
> 2.7 TERAbytes of storage, so I'm a bit confused as to how you might
> expect to fit it into 16GB of RAM...
>
> However, even with terabytes of memory, you would be running into the
> (current) limitation that a single vector in R can have at most 2^31-1 =
> ca. 2 trillion elements.

thank you for also confirming what Douglas had written.

> Yes, you could be doing it wrong, but what is "it"?

we are trying to create a hedonic index: http://tinyurl.com/2fnl3jf

> If the matrix is sparse, there are sparse matrix tools around...

interesting yet again! just read what this was and it seems like it 
could be. also part of the matrix could be a diagonal matrix.

1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 0 0 0 1 0 0 0 0 0
1 0 0 0 0 0 0 0 1 0 0 0
0 1 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 0 0 1 0 0
0 1 0 0 0 0 1 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 0 0
0 0 1 0 0 0 0 0 0 0 1 0
0 0 1 0 0 0 0 0 0 0 0 1
0 0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 1 0 0 0
0 0 0 1 0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0 0 0 1 0

if it is a sparse matrix how would i test? just a smaller subset of data 
that i have run regression on producing similar coefficients?

cheers
paul



More information about the R-help mailing list