compress defaults for save() and save.image()

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

compress defaults for save() and save.image()

Prof Brian Ripley
I have changed the default in save() to compress = !ascii.  This seems
quite safe, as almost always save() is called explicitly and people will
appreciate that it might take a little time to save large objects (and
depending on your system, compression could even be faster).

Should we also change the default in save.image()?  That is almost always
used implicitly, via q(), a menu ....  There are arguments that it is a
more serious change so should not be done at the end of the release cycle,
and also that large .RData files are something people would want to avoid.

BTW, the defaults can be changed via options() (see ?save): has anyone
ever found that useful?

And whilst I am feeling curious, has anyone used save(ascii = TRUE) in
recent years?

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: compress defaults for save() and save.image()

Roger D. Peng


Prof Brian Ripley wrote:
> I have changed the default in save() to compress = !ascii.  This seems
> quite safe, as almost always save() is called explicitly and people will
> appreciate that it might take a little time to save large objects (and
> depending on your system, compression could even be faster).

I'm in favor of such a change.  I almost always explicitly set `compress =
TRUE'.  When I don't use it, it's because I want to be able to load large
objects quickly and I've noticed that loading uncompressed workspaces can be
quite a bit faster.  Usually though, the savings in disk space is worth the
small penalty in loading time.

>
> Should we also change the default in save.image()?  That is almost always
> used implicitly, via q(), a menu ....  There are arguments that it is a
> more serious change so should not be done at the end of the release cycle,
> and also that large .RData files are something people would want to avoid.

I rarely use `save.image()' except to occasionally dump data during a long run
for crash recovery purposes.  I don't think changing the defaults would make a
difference to me.

>
> BTW, the defaults can be changed via options() (see ?save): has anyone
> ever found that useful?

I was not even aware of this!

>
> And whilst I am feeling curious, has anyone used save(ascii = TRUE) in
> recent years?
>

I don't think I've ever used this feature.

-roger

--
Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: compress defaults for save() and save.image()

Liaw, Andy
In reply to this post by Prof Brian Ripley
Ditto for me, with the following exceptions:

- I always use save(..., compress=TRUE), without exception.
- The only time I'd use save.image() is when I need to break a remote
connection on short notice.
- I have not used options() to set the default simply because I have not
figured out how exactly to do it.  From what I remember, the doc simply says
it can be done, but does not explicitly say how.

Andy

From: Roger D. Peng

>
> Prof Brian Ripley wrote:
> > I have changed the default in save() to compress = !ascii.  
> This seems
> > quite safe, as almost always save() is called explicitly
> and people will
> > appreciate that it might take a little time to save large
> objects (and
> > depending on your system, compression could even be faster).
>
> I'm in favor of such a change.  I almost always explicitly
> set `compress =
> TRUE'.  When I don't use it, it's because I want to be able
> to load large
> objects quickly and I've noticed that loading uncompressed
> workspaces can be
> quite a bit faster.  Usually though, the savings in disk
> space is worth the
> small penalty in loading time.
>
> >
> > Should we also change the default in save.image()?  That is almost
> > always
> > used implicitly, via q(), a menu ....  There are arguments
> that it is a
> > more serious change so should not be done at the end of the
> release cycle,
> > and also that large .RData files are something people would
> want to avoid.
>
> I rarely use `save.image()' except to occasionally dump data
> during a long run
> for crash recovery purposes.  I don't think changing the
> defaults would make a
> difference to me.
>
> >
> > BTW, the defaults can be changed via options() (see ?save):
> has anyone
> > ever found that useful?
>
> I was not even aware of this!
>
> >
> > And whilst I am feeling curious, has anyone used save(ascii
> = TRUE) in
> > recent years?
> >
>
> I don't think I've ever used this feature.
>
> -roger
>
> --
> Roger D. Peng  |  http://www.biostat.jhsph.edu/~rpeng/
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: compress defaults for save() and save.image()

Friedrich.Leisch
In reply to this post by Prof Brian Ripley
>>>>> On Thu, 30 Mar 2006 18:23:11 +0100 (BST),
>>>>> Prof Brian Ripley (PBR) wrote:

  > I have changed the default in save() to compress = !ascii.  This seems
  > quite safe, as almost always save() is called explicitly and people will
  > appreciate that it might take a little time to save large objects (and
  > depending on your system, compression could even be faster).

Very good idea.

  > Should we also change the default in save.image()?  That is almost always
  > used implicitly, via q(), a menu ....  There are arguments that it is a
  > more serious change so should not be done at the end of the release cycle,
  > and also that large .RData files are something people would want to avoid.

  > BTW, the defaults can be changed via options() (see ?save): has anyone
  > ever found that useful?

Yes, I and many people I know have

options(save.defaults=list(compress=TRUE))

in our settings, and I'd like to keep the option version such that I
am independent from whatever the function defaults are.


>>>>> Liaw, Andy wrote:

  > - I always use save(..., compress=TRUE), without exception.
  > - The only time I'd use save.image() is when I need to break a remote
  > connection on short notice.
  > - I have not used options() to set the default simply because I have not
  > figured out how exactly to do it.  From what I remember, the doc simply says
  > it can be done, but does not explicitly say how.

Umm, there is an explicit example in help(save), I have added a pointer from
the main text of the help page.


Best,
Fritz

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel