[R] R memory allocation

Martin Morgan mtmorgan at fhcrc.org
Fri May 25 17:33:22 CEST 2012


On 05/25/2012 06:29 AM, swaraj basu wrote:
> Dear All,
>
> I am running R in a system with the following configuration
>
> *Processor: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
> OS: Ubuntu X86_64 10.10
> RAM: 24 GB*
>
> The R session info is
> *
> R version 2.14.1 (2011-12-22)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=C                 LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C   *
>
>
> I have a matrix of dimensions 12 rows X  29318 columns. The matrix contains
> numeric as well as NA values. I am using the* rcorr *function from the *
> Hmisc* package to get correlation information from the matrix (*
> rcorr(matrix)*). During the calculation I get the error "*cannot allocate
> vector of size 6.7 GB*". When I check the memory allocation of my R session
> I get the following information

Perhaps you are trying to calculate correlations between the 12 rows, so 
want to transpose the matrix? If not and if this is a gene expression 
study then common practice is to reduce the number of probe sets to 
those that are most variable across all samples, as these are the ones 
that will provide statistical signal.

Martin

>
> *gc()
>            used (Mb) gc trigger (Mb) limit (Mb) max used (Mb)
> Ncells  249638 13.4     467875 25.0         NA   407500 21.8
> Vcells 1499217 11.5    2335949 17.9       7000  1970005 15.1
>
> *Can someone please help me in finding a workaround to the problem.
>
> -Regards
>
>


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the R-help mailing list