Show memory usage of R objects

July 18, 2011 by
Filed under: Uncategorized 

To show the sizes of objects in memory (in decreasing order of size):

objectsizes <- sapply(ls(), function(x) {object.size(eval(})
objectsizes[order(objectsizes, decreasing = TRUE)]


Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!