[R] loading edited functions already in saved workspace automatically

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Fri May 5 16:14:36 CEST 2017


R normally prompts you to save .RData, but it just automatically saves .Rhistory... the two are unrelated. 
-- 
Sent from my phone. Please excuse my brevity.

On May 5, 2017 6:44:50 AM PDT, Ralf Goertz <r_goertz at web.de> wrote:
>Am Fri, 05 May 2017 06:30:01 -0700
>schrieb Jeff Newmiller <jdnewmil at dcn.davis.ca.us>:
>
>> The answer most people seem to use is to avoid depending on functions
>> in RData files, and in particular avoiding ever saving the
>> "automatic" ".RData" files at all. (Some people avoid using any RData
>> files, but the automatic loading of functions by ".RData" files is a
>> particularly pernicious source of evil as you have already
>> discovered.)
>> 
>> That is,  always work toward building scripts that you run to restore
>> your workspace rather than depending on save files. Don't depend on
>> save files to keep track of what you do interactively. This also
>> usually means that there should be little if anything in
>> your .Rprofile because that tends to build non-reproducibility into
>> your scripts.
>
>Hi Jeff,
>
>thanks for your answer. Actually, I don't use the workspace saving
>feature primarily for the data but for the command line history. Is
>there a way to just save .Rhistory?
>
>Ralf



More information about the R-help mailing list