0

Variants of this question have been asked before (e.g., here, here, here, and here), but none of the suggested solutions works for me.

R returns an error message ("Error: vector memory exhausted (limit reached?)"), even though there is available memory on my computer (a 2019 MacBook Pro with 16 GB memory), as indicated by the Memory Pressure monitor in the Memory tab of the Activity Monitor.

I have set the memory both from the command line (using open .Renviron) and from RStudio (using usethis::edit_r_environ) , as suggested here. Neither solution works.

Has anybody found other solutions to this problem? Also, is there a way to determine, in RStudio, the maximum memory allocated? Sys.getenv() does not return this information.

I do not encounter this problem in base R -- only RStudio.

Session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16
nicholas
  • 903
  • 2
  • 12
  • Can you provide the context of how/when the error happened? How many other objects have been created and what are their sizes? You can put some statements to print out the available memory just before and to also out the size of the object being created. If you have already allocated 15GB of space and then trying to allocate 2GB more, you are out of luck. – Retired Data Munger Mar 27 '21 at 02:50
  • The error happened during a vector operation to create a large dataset (14.6 GB when written to disk as a .feather file). The relevant script works in base R, but not in RStudio. What is the statement to print the available memory? – nicholas Mar 27 '21 at 05:07

0 Answers0