0

I was doing some analyses in R studio and up to now everything worked fine. Out of a sudden however I'm getting the error message

no memory available

and can't do certain computations anymore (which worked fine beforehand).

Does anyone know this problem, respectively how to solve it?

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
  • Does it actually say "no memory available" or are you paraphrasing? I have a feeling it says "Error: cannot allocate vector of size ___" or "In '... ' reached total allocation of ___", in which case this question is a duplicate. Change the memory limit, use 64-bit R, and/or use tips from the highly upvoted R memory management thread to manage memory better. – Hack-R Sep 13 '16 at 13:21
  • No it is saying exactly this: "Error in logistf.fit(x = x, y = y, weight = weight, offset = offset, firth, : no memory available" ...my memory limit is at 16247 and I'm already using 64-bit R... I'll check the memory management thread again but if I remember right I couldn't find an answer there before... – Summit Cross Sep 13 '16 at 13:29
  • now I tried to increase the memory limit (1e+12) but it is still not working... I have just one object which has 556 kb so I really don't know what could suddenly be causing the problem? – Summit Cross Sep 13 '16 at 13:40
  • Do you have many columns (k) and/or rows (n) in your input? The C code behind the `logistf::logistf.fit` function tries to allocate objects of size n*k and k*k. – Roland Sep 13 '16 at 13:51
  • 1
    You are aware that you can change the memory limit, but if you don't have additional physical RAM it won't help you? – Roland Sep 13 '16 at 13:52
  • the object has 379 rows and 257 columns, but also after getting rid of 20 variables it still gives the same error message - should I try to reduce even more? but again, it was working just fine before (and I hadn't added anything new)... similarly with my physical RAM - I already closed almost all other running programs and have about 8/16 gb free right now...can't imagine that this should be not enough? also restarting r did no help... – Summit Cross Sep 13 '16 at 14:33
  • oh, you meant the input for the function? this has 5 variables and really, after removing two of them it works! but now that's still a problem cause I need all of them... and also before there were 5 variables and it worked?! – Summit Cross Sep 13 '16 at 14:39
  • any idea anyone ? – Summit Cross Sep 13 '16 at 16:54
  • Welcome to SO. Please review [how to ask](http://stackoverflow.com/help/how-to-ask) and [reproducible questions in R](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). A better formulated, and more specific, question is likely to get you more, and more more-useful, responses. – alexwhitworth Sep 13 '16 at 22:00

0 Answers0