When R boots, the memory limit (as returned by memory.limit) is set to 2 GB, regardless of the available memory on the computer. ( I found this recently ). I assume that at some point in the boot process this limit is set to the actually available memory.
This can be seen by typing memory.limit() in the .Rprofile file that was received at startup. He prints "2047." On the other hand, when R memory.limit() and I type memory.limit() in the console, I get "16289".
I use my own .Rprofile file, and at boot time I need to have access to more than 2 GB.
How can I override this limit?
My current workaround is to set the limit myself in .Rprofile using memory.limit(size=16289) , but then I will have to edit this every time I work on a computer with a different amount of RAM, which happens quite often.
Is there an option that I can change, an .ini file that I can edit, or anything I can do about it?
OS and R version:
> sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
Edit: this is not a duplicate , at least not a duplicate of the proposed question. This is not about managing available memory! I have 16 GB of memory, and memory.limit() shows that my limit is really 16 GB.
It all started when I received a warning that “reached 2 GB of memory” (meaning that I have a limit of 2 GB of memory). After research, it seems that indeed R limits memory at 2 GB during the startup process .
I want to load my data automatically when R starts, for this I have a small script load in .Rprofile . I download more than 2 GB of data, so I need to have access to my 16 GB. My question is to achieve this. This has nothing to do with the proposed duplicate except keywords ...