R memory management / cannot allocate vector of size n Mb

后端 未结 8 2009
攒了一身酷
攒了一身酷 2020-11-21 07:18

I am running into issues trying to use large objects in R. For example:

> memory.limit(4000)
> a = matrix(NA, 1500000, 60)
> a = matrix(NA, 2500000,         


        
8条回答
  •  面向向阳花
    2020-11-21 08:07

    If you are running your script at linux environment you can use this command:

    bsub -q server_name -R "rusage[mem=requested_memory]" "Rscript script_name.R"
    

    and the server will allocate the requested memory for you (according to the server limits, but with good server - hugefiles can be used)

提交回复
热议问题