Error: vector memory exhausted (limit reached?)

If you hit “Error: vector memory exhausted (limit reached?)” error on Exploratory, you can try the following.

1. Remove unnecessary data frames.

Removing unnecessary data frames will release the memory.

2. Change the max memory allocation size for R.

You can increase the maximum memory allocation size for R by the following steps.

  • Click “+” button next to “Script” to create a new script.
  • Make sure “Load this script when the project is opened” checkbox is on.
  • Enter the following command. The following example sets 32GB as new max memory size.
Sys.setenv('R_MAX_VSIZE'=32000000000)
  • Click “Save”.

Note that it depends on your machine spec. If your machine can allocate memory up to 16GB, then the max memory size will be 16GB even if you set 32GB.