Re: [R] problem in finding sizes of objects using a for loop

2012-10-26 Thread PIKAL Petr
s > Sent: Thursday, October 25, 2012 8:20 PM > To: jim holtman > Cc: r-help > Subject: Re: [R] problem in finding sizes of objects using a for loop > > > On Oct 25, 2012, at 10:56 AM, jim holtman wrote: > > > Here is a function I use to get the size of objec

Re: [R] problem in finding sizes of objects using a for loop

2012-10-25 Thread David Winsemius
On Oct 25, 2012, at 10:56 AM, jim holtman wrote: > Here is a function I use to get the size of objects: > > Here is an example output: > >> my.ls() > Size Mode > allStores 7,303,224 list > convertedStores 0 NULL > f.createCluster40,508 function

Re: [R] problem in finding sizes of objects using a for loop

2012-10-25 Thread jim holtman
Here is a function I use to get the size of objects: Here is an example output: > my.ls() Size Mode allStores 7,303,224 list convertedStores 0 NULL f.createCluster40,508 function x 41,672 list **Total 7,385,404 -

Re: [R] problem in finding sizes of objects using a for loop

2012-10-25 Thread arun
der Cc: r-help Sent: Thursday, October 25, 2012 2:40 AM Subject: Re: [R] problem in finding sizes of objects using a for loop Dear Purna, You need the get() function around object[i] in order to accomplish the same results: # data x<-rnorm(1) y<-runif(100,min=40,max=1000) # sizes ob

Re: [R] problem in finding sizes of objects using a for loop

2012-10-24 Thread Jorge I Velez
Dear Purna, You need the get() function around object[i] in order to accomplish the same results: # data x<-rnorm(1) y<-runif(100,min=40,max=1000) # sizes objects<-ls() for (i in seq_along(objects)){ print(c(objects[i],object.size(get(objects[i] # get() is added here } [1] "x" "

[R] problem in finding sizes of objects using a for loop

2012-10-24 Thread Purna chander
Dear All, I wanted to extract the sizes of all created objects. For E.g when I created 2 objects(x and y), I got their sizes using the following code: > x<-rnorm(1) > y<-runif(100,min=40,max=1000) > ls() [1] "x" "y" > object.size(x) 80024 bytes > object.size(y) 824 bytes However, I was unabl