How to clean up R memory (without the need to restart my PC)?

后端 未结 8 954
小蘑菇
小蘑菇 2020-12-07 14:37

I am running my code in R (under Windows) which involves a lot of in-memory data. I tried to use rm(list=ls()) to clean up memory, but seems the memory is still

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 15:28

    I came under the same problem with R. I dig a bit and come with a solution, that we need to restart R session to fully clean the memory/RAM. For this, you can use a simple code after removing everything from your workspace. the code is as follows :

    rm(list = ls())
    
    .rs.restartR()
    

提交回复
热议问题