Ralf Goertz
2017-May-05 13:44 UTC
[R] loading edited functions already in saved workspace automatically
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
Jeff Newmiller
2017-May-05 14:14 UTC
[R] loading edited functions already in saved workspace automatically
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
Ralf Goertz
2017-May-05 14:23 UTC
[R] loading edited functions already in saved workspace automatically
Am Fri, 05 May 2017 07:14:36 -0700 schrieb Jeff Newmiller <jdnewmil at dcn.davis.ca.us>:> R normally prompts you to save .RData, but it just automatically > saves .Rhistory... the two are unrelated.Not here. If I say "n" to the prompted question "Save workspace image? [y/n/c]: " my history doesn't get saved. Version: R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-suse-linux-gnu (64-bit)
Michael Dewey
2017-May-05 14:48 UTC
[R] loading edited functions already in saved workspace automatically
Dear Ralf You can manually save it with savehistory(insertyour preferred filenamehere.r) or does that not do what you hoped? On 05/05/2017 14:44, Ralf Goertz 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 > > ______________________________________________ > 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. > > --- > This email has been checked for viruses by AVG. > http://www.avg.com > >-- Michael http://www.dewey.myzen.co.uk/home.html
David Winsemius
2017-May-05 18:46 UTC
[R] loading edited functions already in saved workspace automatically
> On May 5, 2017, at 7:48 AM, Michael Dewey <lists at dewey.myzen.co.uk> wrote: > > Dear Ralf > > You can manually save it with > savehistory(insertyour preferred filenamehere.r) > > or does that not do what you hoped?Or you can exit to your system browser and copy of the desired sections of the .Rhistory file that you desire archiving to a text editor (after you find the ofttimes hidden file.) It's just a text file. The details vary across OSes. I don't think you told us yours. Might help to read the Posting Guide. -- David> > On 05/05/2017 14:44, Ralf Goertz 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 >> >> ______________________________________________ >> 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. >> >> --- >> This email has been checked for viruses by AVG. >> http://www.avg.com >> >> > > -- > Michael > http://www.dewey.myzen.co.uk/home.html > > ______________________________________________ > 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.David Winsemius Alameda, CA, USA
Bert Gunter
2017-May-05 21:38 UTC
[R] loading edited functions already in saved workspace automatically
Haven't followed this closely, but ?Startup and links therein might be useful (esp .First). Bert On May 5, 2017 11:47 AM, "David Winsemius" <dwinsemius at comcast.net> wrote:> On May 5, 2017, at 7:48 AM, Michael Dewey <lists at dewey.myzen.co.uk> wrote: > > Dear Ralf > > You can manually save it with > savehistory(insertyour preferred filenamehere.r) > > or does that not do what you hoped?Or you can exit to your system browser and copy of the desired sections of the .Rhistory file that you desire archiving to a text editor (after you find the ofttimes hidden file.) It's just a text file. The details vary across OSes. I don't think you told us yours. Might help to read the Posting Guide. -- David> > On 05/05/2017 14:44, Ralf Goertz 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 >> >> ______________________________________________ >> 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. >> >> --- >> This email has been checked for viruses by AVG. >> http://www.avg.com >> >> > > -- > Michael > http://www.dewey.myzen.co.uk/home.html > > ______________________________________________ > 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.David Winsemius Alameda, CA, USA ______________________________________________ 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. [[alternative HTML version deleted]]