Need your help in understanding memory usage in R. As per this link http://adv-r.had.co.nz/memory.html#gc
It says " object_size() tells you the size of a single object, pryr::mem_used() tells you the total size of all objects in memory:"
But I did an experiment to make sure this works as mentioned. But I see some differences.
> new_asd <- iris %>% group_by(Species) %>% summarise(Sepal.Length = sum(Sepal.Length))
> new_asd_1 <- iris %>% group_by(Species) %>% summarise(Sepal.Length = sum(Sepal.Length))
> mem_used()
134 MB
> object_size(new_asd, new_asd_1)
2,272 B
Please see above, the total memory and objects size of all the objects are not same. I also created another object
> new_asd_2 <- iris %>% group_by(Species) %>% summarise(Sepal.Length = sum(Sepal.Length))
> object_size(new_asd, new_asd_1, new_asd_2)
2,960 B
> mem_used()
134 MB
Still the mem_used is same 134MB. Not sure why???