[Rd] save() size in XDR

2004-02-26 Thread Nathan Whitehouse
Dear R-devel, Is there a way to find the size in bytes of a save() command --before-- the file has been saved? If not, can anyone point me to some resources on XDR so I can find a way to calculate it? Thanks, = Nathan Whitehouse Statistics/Programming Baylor College of Medicine Hous

Re: [Rd] save() size in XDR

2004-02-26 Thread Duncan Murdoch
On Thu, 26 Feb 2004 19:31:15 + (GMT), Prof Brian Ripley <[EMAIL PROTECTED]> wrote : >On Thu, 26 Feb 2004, Duncan Murdoch wrote: >> One way to solve this problem would be to create a connection that did >> nothing except keep track of a file position, then do the save to that >> connection. H

Re: [Rd] save() size in XDR

2004-02-26 Thread Luke Tierney
On Thu, 26 Feb 2004, Nathan Whitehouse wrote: > > > > I don't think so, though you can guess: integers > > are stored in 4 > > bytes, floats in 8, etc. > > I think this would be good if we only needed a rough > estimate, but we need something precise. > > > One way to solve this problem wo

Re: [Rd] save() size in XDR

2004-02-26 Thread Prof Brian Ripley
On Thu, 26 Feb 2004, Duncan Murdoch wrote: > On Thu, 26 Feb 2004 08:21:05 -0800 (PST), Nathan Whitehouse > <[EMAIL PROTECTED]> wrote : > > >Dear R-devel, > > > > Is there a way to find the size in bytes of a save() > >command --before-- the file has been saved? > > I don't think so, though you

Re: [Rd] save() size in XDR

2004-02-26 Thread Nathan Whitehouse
> > I don't think so, though you can guess: integers > are stored in 4 > bytes, floats in 8, etc. I think this would be good if we only needed a rough estimate, but we need something precise. > One way to solve this problem would be to create a > connection that did > nothing except keep tr

Re: [Rd] save() size in XDR

2004-02-26 Thread Douglas Bates
Nathan Whitehouse <[EMAIL PROTECTED]> writes: > Is there a way to find the size in bytes of a save() > command --before-- the file has been saved? You could try object.size(obj) which gives the size of the internal representation. The external representation should not be much larger. If

Re: [Rd] save() size in XDR

2004-02-26 Thread Duncan Murdoch
On Thu, 26 Feb 2004 08:21:05 -0800 (PST), Nathan Whitehouse <[EMAIL PROTECTED]> wrote : >Dear R-devel, > > Is there a way to find the size in bytes of a save() >command --before-- the file has been saved? I don't think so, though you can guess: integers are stored in 4 bytes, floats in 8, etc.