[ESS] "source is real", dump-objects, etc.

Douglas Bates bates at stat.wisc.edu
Sun Mar 30 19:33:29 CEST 2008


On Sun, Mar 30, 2008 at 12:03 PM, Jeff Marcus <Jeffrey.Marcus at nuance.com> wrote:
> Hello:

>   This is a philosophical question more than an appeal for help: One
>  well-supported model for ess is to dump objects to files using C-c d,
>  editing them there and loading them back in. This is a way of enforcing
>  the "source is real" philosophy: all R objects are kept as source files
>  and loaded as necessary. It appears that this philosophy also implies
>  that you don't save objects (with save.image) at the end of each R
>  session for reloading in future sessions. Instead you source needed
>  objects back in as required.

>   While I agree with the philosophy, I don't dump and edit objects this
>  way. Instead, I create source files, each containing a bunch of related
>  functions, and source them in to R. To modify the function, I edit the
>  source file and souce it back in, just as I would with most other
>  languages. To avoid re-creating my environment each session, I save the
>  image. I also save out any non-function objects created without sourcing
>  them to text files.

>   The advantage I see to my approach is that I can see source for all my
>  functions together in one file rather then storing a single file per
>  object. One advantage of the dump-objects approach is that ess keeps
>  track of where the source is for each object. But I can use emacs TAGS
>  for that as well.

Your approach is the moral equivalent of creating a package.  Wouldn't
it be easier to create a package instead?  The package model is very
well supported in R.

>   Are there other advantages to the dump-objects approach that I am
>  missing? Thanks for any insight.
>
>
>
>   Jeff
>
>
>
>
>
>  ____________________________________________
>
>  JEFF MARCUS
>  Manager, Applied Data Analysis
>
>  NUANCE COMMUNICATIONS, INC.
>  One Wayside Road
>  Burlington  MA  01803
>
>  781 565 5000   Office
>  781-565 5001   Fax
>  NUANCE.COM <http://www.nuance.com/>
>
>  The experience speaks for itself (tm)
>
>
>
>
>         [[alternative HTML version deleted]]
>
>  ______________________________________________
>  ESS-help at stat.math.ethz.ch mailing list
>  https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list