Re: [R] features of save and save.image (unexpected file sizes)

2007-02-02 Thread Prof Brian Ripley
On Thu, 1 Feb 2007, Vaidotas Zemlys wrote: Hi, On 2/1/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 1 Feb 2007, Vaidotas Zemlys wrote: Hi, On 1/31/07, Professor Brian Ripley [EMAIL PROTECTED] wrote: Two comments: 1) ls() does not list all the objects: it has all.names

Re: [R] features of save and save.image (unexpected file sizes)

2007-02-02 Thread Vaidotas Zemlys
Hi, On 2/2/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: I found the culprit. I was parsing formulas in my code, and I saved them in that large object. So the environment came with saved formulas. Is there a nice way to say R: please do not save the environments with the formulas, I do

Re: [R] features of save and save.image (unexpected file sizes)

2007-02-02 Thread Prof Brian Ripley
On Fri, 2 Feb 2007, Vaidotas Zemlys wrote: Hi, On 2/2/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: I found the culprit. I was parsing formulas in my code, and I saved them in that large object. So the environment came with saved formulas. Is there a nice way to say R: please do not

Re: [R] features of save and save.image (unexpected file sizes)

2007-02-02 Thread Vaidotas Zemlys
Hi, On 2/2/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Fri, 2 Feb 2007, Vaidotas Zemlys wrote: Hm, I copied this code directly from Emacs+ESS, maybe the mailer mangled something. What I want to do with this piece of code (I will repaste it here) testf- function(formula) {

Re: [R] features of save and save.image (unexpected file sizes)

2007-02-02 Thread Luke Tierney
On Fri, 2 Feb 2007, Prof Brian Ripley wrote: On Fri, 2 Feb 2007, Vaidotas Zemlys wrote: Hi, On 2/2/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: I found the culprit. I was parsing formulas in my code, and I saved them in that large object. So the environment came with saved formulas. Is

Re: [R] features of save and save.image (unexpected file sizes)

2007-02-01 Thread Vaidotas Zemlys
Hi, On 2/1/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 1 Feb 2007, Vaidotas Zemlys wrote: Hi, On 1/31/07, Professor Brian Ripley [EMAIL PROTECTED] wrote: Two comments: 1) ls() does not list all the objects: it has all.names argument. Yes, I tried it with all.names,

[R] features of save and save.image (unexpected file sizes)

2007-01-31 Thread Vaidotas Zemlys
Hi, Today I came upon unexpected R behaviour. I did some modelling and the result was R object, about 28MB size (nested list, with matrixes as list elements). When I was saving the session with save.image, the resulting .RData file was 300MB. There were no other large objects:

Re: [R] features of save and save.image (unexpected file sizes)

2007-01-31 Thread Professor Brian Ripley
Two comments: 1) ls() does not list all the objects: it has all.names argument. 2) save.image() does not just save the objects in the workspace, it also saves any environments they may have. Having a function with a large environment is the usual cause of a large saved image. (And finally, a

Re: [R] features of save and save.image (unexpected file sizes)

2007-01-31 Thread Vaidotas Zemlys
Hi, On 1/31/07, Professor Brian Ripley [EMAIL PROTECTED] wrote: Two comments: 1) ls() does not list all the objects: it has all.names argument. Yes, I tried it with all.names, but the effect was the same, I forgot to mention it in a letter. 2) save.image() does not just save the objects in