Hi R-Community: Here is what I want to do: Every time I start R I want R to: 1. remove(list=ls()), and 2. "source" another file automatically. Then, when I shutdown R, I want R to: 1. remove(list=ls()) How do I do this? I recall vaguely that S could do this, but I don't remember exactly how it worked. Thanks for your help! Phil Smith
Philip Smith wrote:> Hi R-Community: > > > Here is what I want to do: > > > Every time I start R I want R to: > > > 1. remove(list=ls()), andYou do not need to given you start with an emty workspace, i.e. start R with: R --no-restore> 2. "source" another file automatically.Write it in your RProfile (for details, see ?Startup)> > Then, when I shutdown R, I want R to: > > > 1. remove(list=ls())Then do not save the workspace or start R with R --no-save (or with both args: R --no-save --no-restore) Uwe Ligges> > How do I do this? > > > I recall vaguely that S could do this, but I don't remember exactly how > it worked. > > > Thanks for your help! > > > Phil Smith > > ______________________________________________ > R-help at r-project.org mailing list > 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.
Hi, ?.First ?.Last Sammy Philip James Smith wrote:> > Hi R-Community: > > > Here is what I want to do: > > > Every time I start R I want R to: > > > 1. remove(list=ls()), and > > 2. "source" another file automatically. > > > Then, when I shutdown R, I want R to: > > > 1. remove(list=ls()) > > > How do I do this? > > > I recall vaguely that S could do this, but I don't remember exactly how > it worked. > > > Thanks for your help! > > > Phil Smith > > ______________________________________________ > R-help at r-project.org mailing list > 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. > >----- Blay S KATH Kumasi, Ghana. -- View this message in context: http://www.nabble.com/R-startup-and-shutdown-question-tp21622562p21637693.html Sent from the R help mailing list archive at Nabble.com.