12,576 function
> my.ls1 23,424 function
> sorted 48 logical
> **Total 36,048 ---
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org
l 36,048 ---
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Nordlund, Dan
> (DSHS/RDA)
> Sent: Thursday, September 08, 2011 8:33 AM
> To: r-h
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of jim holtman
> Sent: Thursday, September 08, 2011 6:52 AM
> To: Bos, Roger
> Cc: r-help@r-project.org
> Subject: Re: [R] Variable scoping question
>
>
Here is a function I use to look at the sizes of objects:
my.ls <-
function (pos = 1, sorted = FALSE)
{
.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(rbi
On Sep 8, 2011, at 9:13 AM, Bos, Roger wrote:
I modified an example in the object.size help page to create a
function
I want to be able to run:
"mysize" <- function() {
z <- sapply(ls(), function(w) object.size(get(w)))
as.matrix(rev(sort(z))[1:5])
}
mysize()
When I test the lines ins
5 matches
Mail list logo