Re: [R] Summary of Total Object.Size in R Script

2009-01-15 Thread Henrik Bengtsson
See also ll() in the R.oo package, e.g. # To list all objects in .GlobalEnv: ll() member data.class dimension objectSize 1*tmp* Person 1 428 2 as.character.Person function NULL1208 3 country character 1

Re: [R] Summary of Total Object.Size in R Script

2009-01-15 Thread Gundala Viswanath
Sorry for my late reply. Thank you so much Jim. This script of yours is very2 useful. I have used it. - Gundala Viswanath Jakarta - Indonesia On Wed, Jan 14, 2009 at 12:17 AM, jim holtman wrote: > Here is a function I use to see how big the objects in my workspace are: > >> my.ls <- > + funct

Re: [R] Summary of Total Object.Size in R Script

2009-01-13 Thread Prof Brian Ripley
On Tue, 13 Jan 2009, jim holtman wrote: That is certainly true because I have seen differences due to the sharing of values. I also look at what 'gc()' shows at the memory being used. Does this provide a reasonable estimate of the total space being used? Yes, but not just by your workspace,

Re: [R] Summary of Total Object.Size in R Script

2009-01-13 Thread jim holtman
That is certainly true because I have seen differences due to the sharing of values. I also look at what 'gc()' shows at the memory being used. Does this provide a reasonable estimate of the total space being used? On Tue, Jan 13, 2009 at 11:14 AM, Prof Brian Ripley wrote: > On Tue, 13 Jan 2009

Re: [R] Summary of Total Object.Size in R Script

2009-01-13 Thread Prof Brian Ripley
On Tue, 13 Jan 2009, jim holtman wrote: Here is a function I use to see how big the objects in my workspace are: Be careful with the caveats spelled out in ?object.size. Especially for character data such summations can be way off. my.ls <- + function (pos = 1, sorted = F) + { + .r

Re: [R] Summary of Total Object.Size in R Script

2009-01-13 Thread jim holtman
Here is a function I use to see how big the objects in my workspace are: > my.ls <- + function (pos = 1, sorted = F) + { + .result <- sapply(ls(pos = pos, all.names = TRUE), function(..x) object.size(eval(as.symbol(..x + if (sorted) { + .result <- rev(sort(.result)) + } +

[R] Summary of Total Object.Size in R Script

2009-01-13 Thread Gundala Viswanath
Dear all, Is there a way we can find the total object.size of all the objects in our R script? The reason we want to do this because we want to know how much memory does our R script require overall. Rprofmem(), doesn't seem to do it. and Unix 'top' command is dynamic and it doesn't give the ex