When can I benefit from performing garbage collection in R

Possible duplicate:
Force garbage collection to run in R using the gc () command

I was wondering if any of my code could use garbage collection, i.e.

> gc() 

In the gc help, I read: "The gc call causes garbage collection, which will also be performed automatically without user intervention, and the main purpose of the gc call is to report on memory usage."

I'm pretty careful to remove large objects after they are no longer needed, but I feel that the speed of my operations continues to decrease during the session. I did not notice a significant improvement with gc () periodically - and the above description shows that this operation occurs automatically from time to time. Does anyone have suggestions for its proper use?

Greetings

+6
source share

Source: https://habr.com/ru/post/915265/


All Articles