Error: vector memory exhausted (limit reached?) R 3.5.0 macOS

前端 未结 3 2069
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 03:57

I\'ve been working for a while with a number of large files containing gene expression data, and I\'ve recently run into an issue with loading that data into R, after upgrad

3条回答
  •  情歌与酒
    2020-12-01 04:38

    For those using Rstudio, I've found that setting Sys.setenv('R_MAX_VSIZE'=32000000000) only works on the command line, and that setting that parameter while using Rstudio does not prevent this error:

    Error: vector memory exhausted (limit reached?)

    After doing some more reading, I found this thread, which clarifies the problem with Rstudio, and identifies a solution, shown below:

    Step 1: Open terminal,

    Step 2:

    cd ~
    touch .Renviron
    open .Renviron
    

    Step 3: Save the following as the first line of .Renviron:

    R_MAX_VSIZE=100Gb 
    

    Note: This limit includes both physical and virtual memory; so setting _MAX_VSIZE=16Gb on a machine with 16Gb of physical memory may not prevent this error. You may have to play with this parameter, depending on the specs of your machine

提交回复
热议问题