[R] .Rdata files -- fortune?

Jan Kim jttkim at googlemail.com
Wed Mar 11 16:44:16 CET 2015


On Wed, Mar 11, 2015 at 09:00:15AM -0400, Prof J C Nash (U30A) wrote:
> Well put. I avoid them too, and go so far as to seek and destroy so they
> don't get loaded unnoticed and cause unwanted consequences.
> 
> ".RData files (the ones with nothing before the period) are just traps
> for your future self, with no documentation. I avoid them like the plague."

I absolutely agree. While I've solved the issue for myself long
ago by always putting something like

    alias R='R --no-save --no-restore'

into my startup scripts (~/.bashrc or the like), I've seen too many
others caught out by implicit saving / restoring of workspaces (e.g.
by somehow just accepting that R "only works properly in this particular
directory" and therefore doing all their work there at the cost of
adopting various anti-patterns with respect to organising work into
directories.

Personally I think that auto saving / restoring workspaces should
be reviewed, as it can, in practice, make it harder for people to
render their work in a self-contained and reproducible way.

Best regards, Jan

> 
> JN
> 
> On 15-03-11 07:00 AM, r-help-request at r-project.org wrote:
> > Message: 34
> > Date: Tue, 10 Mar 2015 17:51:15 -0700
> > From: Jeff Newmiller <jdnewmil at dcn.davis.CA.us>
> > To: Rolf Turner <r.turner at auckland.ac.nz>, Erin Hodgess
> > 	<erinm.hodgess at gmail.com>, R help <r-help at stat.math.ethz.ch>
> > Subject: Re: [R] .Rprofile vs. First (more of an opinion question)
> > Message-ID: <E5A53229-B271-42D9-BEAB-73142B2F62F4 at dcn.davis.CA.us>
> > Content-Type: text/plain; charset="UTF-8"
> > 
> > I concur with Rolf.
> > 
> > .RData files (the ones with nothing before the period) are just traps for your future self, with no documentation. I avoid them like the plague. I refer to specifically-named Something.RData files in my .R/.Rnw/.Rmd files to cache results of long computations, but they are optional in my workflow because I always have R code that can regenerate them.
> > 
> > .Rprofile files offer consistency of behavior  regardless of which working directory you use, and you can comment them.
> > ---------------------------------------------------------------------------
> > Jeff Newmiller                        The     .....       .....  Go Live...
> > DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
> >                                       Live:   OO#.. Dead: OO#..  Playing
> > Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> > /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> > --------------------------------------------------------------------------- 
> > Sent from my phone. Please excuse my brevity.
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: jttkim at gmail.com                                |
 |             WWW:   http://www.jtkim.dreamhosters.com/              |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*



More information about the R-help mailing list