Here is a function I use: 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)) } .ls <- as.data.frame(rbind(as.matrix(.result),"**Total"=sum(.result))) names(.ls) <- "Size" .ls$Size <- formatC(.ls$Size, big.mark=',', digits=0, format='f') .ls$Mode <- c(unlist(lapply(rownames(.ls)[-nrow(.ls)], function(x)mode(eval(as.symbol(x))))), '-------') .ls }
On 9/27/06, Ben Fairbank <[EMAIL PROTECTED]> wrote: > Does R provide a function analogous to LS() or str() that reports the > storage space, on disk or in memory, required by objects? > > Ben Fairbank > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.