R memory management / cannot allocate vector of size n Mb

后端 未结 8 2010
攒了一身酷
攒了一身酷 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条回答
  •  猫巷女王i
    2020-11-21 08:16

    I followed to the help page of memory.limit and found out that on my computer R by default can use up to ~ 1.5 GB of RAM and that the user can increase this limit. Using the following code,

    >memory.limit()
    [1] 1535.875
    > memory.limit(size=1800)
    

    helped me to solve my problem.

提交回复
热议问题