[R] Largest allowable matrix

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 21 08:46:14 CET 2005


On Mon, 21 Nov 2005, Uwe Ligges wrote:

> Barry Baker wrote:
>
>> Hello,
>>
>> I am a new R user and have two datasets that I would like to analyze.  The
>> first is (2409222 x 17) and the other is (21682998 x 17). Is this possible
>> in R?  If not then what is the maximum number of rows and columns or number
>> of elements that R can handle?
>
>
> The number of columns and rows is not a problem here, but you will need
> 21682998 * 17 * 4 bytes to store the latter matrix (assuming floats) in
> memory, that is 1406.139 Mb.

R does not use floats internally.  So unless these are integers/logicals 
you are going to need twice that,

> In order to do something sensible with the data, you need *at least*
> twice the amount of RAM, hence at least 3Gb.

Here I think the issue is rather virtual memory and address space.  You 
will need a 64-bit OS to do anything with this object.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list