This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how I can increase the usable memory in R?

Hello,

Is there a way to increase the usable memory into R by using virtual memory of the hard disk? Because many R packages can't allocate a matrix with more than 20000 columns and 100 row and always the same error

res_aracne <- build.mim(tmycounts,estimator = "spearman")
Error: cannot allocate vector of size 3.4 Gb
In addition: Warning messages:
1: In `diag<-`(`*tmp*`, value = 0) :
  Reached total allocation of 8088Mb: see help(memory.size)
2: In `diag<-`(`*tmp*`, value = 0) :
  Reached total allocation of 8088Mb: see help(memory.size)
3: In `diag<-`(`*tmp*`, value = 0) :
  Reached total allocation of 8088Mb: see help(memory.size)
4: In `diag<-`(`*tmp*`, value = 0) :
  Reached total allocation of 8088Mb: see help(memory.size)
> memory.size()
[1] 3967.84
> memory.size(max = TRUE)
[1] 4865.25

Thank you

r software-error

You should read the error messages, really, really, really :P

see help(memory.size)

so you type help(memory.size) and get a page that tells you also how to query and set memory.limit

Usage

memory.size(max = FALSE)

memory.limit(size = NA)
Arguments

max    
logical. If true the maximum amount of memory obtained from the OS is reported, otherwise the amount currently in use.
size    
numeric. If NA report the memory size, otherwise request a new limit, in Mb.

Hello Fereshteh!

We believe that this post does not fit the main topic of this site.

Btw, this is not a bioinformatics question

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

This time I don't agree with this thread being closed. R is used by many bioinformaticians that have to face limits in their available memory

I am very much interested in how can I solve this problem the day I am running a RNA-Seq or microarray analysis, and I cannot do it because I run out of resources

1 answer

Hi,

You may find the solution you're looking for on this page. Depending on your OS and its version, you will have to apply different solution.

Remember that allowing R to use to much memory (relatively to the current available amount) will lead to errors or core dumps.

Log in to answer this question.