0

I get this error "Error: cannot allocate vector of size 2.8 GB" when i execute a code in Server based R studio.

I am trying to allocate matrix of size 2.8GB for using it in lpsolve package.

Server has 16GB RAM, but it is not able to allocate 2.8 GB.

Please help me solve this issue.

Thanks in advance

Damini S
  • 1
  • 1
  • 4
    https://stackoverflow.com/questions/5171593/r-memory-management-cannot-allocate-vector-of-size-n-mb – Ronak Shah Jun 10 '20 at 07:33
  • 1
    +1 to @RonakShah's comment. Also, notice how much more useful information the OP in the post he linked to provided. [This post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) provides guidance on giving us the information we need to help you help yourself. – Limey Jun 10 '20 at 07:43
  • For such large models, LpSolve may not be the most appropriate solver. – Erwin Kalvelagen Jun 14 '20 at 03:26
  • LpSolve is both not the best algorithm for large LPs but also its R interface is a problem. An LP matrix is typically very sparse. So we should never allocate a dense matrix to hold the LP matrix. – Erwin Kalvelagen Jun 14 '20 at 03:34

0 Answers0