0

So I just finish doing some heavy-lifting with R on a ~200 Gb dataset. in which I used the the following packages (don't know if it's relevant or not):

library(stringdist)
library(tidyverse)
library(data.table)

Afterwards I want to clear memory so I can move on to the next step, for this I use:

remove(list = ls())
dev.off()
gc(full = T)
cat("\f")

What I am looking to with these commands is "a fresh start" in which all of my environment is as if I have just opened R for the fist time (and loaded in the relevant packages).

However, checking my task manager reveals R is still using ~55 Gb of memory. Needless to say, this is way to much for an "empty" R to occupy. So my guess is R is holding on to something. Why does this happen? and how can I reduce this memory usage to few Mb R uses normally?

Thanks!

cach dies
  • 331
  • 1
  • 14

0 Answers0