Hi, I use the Windows R GUI. I frequently use (or have my students use) foreign and survival packages. I would like to make them part of the basic start-up package set (like base, ctest, etc.) using something short of recompiling a special Windows version of R. Is this possible? I examined the autoload() command but this seems to target a single command of package, and only apply during a single run of R. Is there an initiation text file I could modify? I can find no mention in the documentation of how this might be done. Thanks, Rob [[alternative HTML version deleted]]
Take a look at ?Startup. You can create a Rprofile file which loads these packages from the start. -roger imap wrote:> Hi, > > I use the Windows R GUI. I frequently use (or have my students use) foreign and survival packages. I would like to make them part of the basic start-up package set (like base, ctest, etc.) using something short of recompiling a special Windows version of R. Is this possible? I examined the autoload() command but this seems to target a single command of package, and only apply during a single run of R. Is there an initiation text file I could modify? I can find no mention in the documentation of how this might be done. > > Thanks, > Rob > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
On Tue, 20 Jan 2004, imap wrote:> Hi, > > I use the Windows R GUI. I frequently use (or have my students use) > foreign and survival packages. I would like to make them part of the > basic start-up package set (like base, ctest, etc.) using something > short of recompiling a special Windows version of R. Is this possible? > I examined the autoload() command but this seems to target a single > command of package, and only apply during a single run of R. Is there > an initiation text file I could modify? I can find no mention in the > documentation of how this might be done.There certainly is. You can use a site profile file, or you can set R_DEFAULT_PACKAGES. Both are described in ?Startup (a pretty obvious place to look, surely). For example, you might put in R_HOME/etc/Rprofile.site options(defaultPackages=c(getOption("defaultPackages"), "foreign", "survival")) Please sort out a proper user name for your mail .... -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
See Introduction to R section 10.8 and Appendix B.2. I searched for `.First` to find it, but then, I knew what to look for ... searching for `startup` would find it too.> -----Original Message----- > From: imap [mailto:rbaer at atsu.edu] > Sent: 20 January 2004 15:16 > To: r-help at stat.math.ethz.ch > Subject: [R] Loading packages at startup > > > Security Warning: > If you are not sure an attachment is safe to open please contact > Andy on x234. There are 0 attachments with this message. > ________________________________________________________________ > > Hi, > > I use the Windows R GUI. I frequently use (or have my > students use) foreign and survival packages. I would like to > make them part of the basic start-up package set (like base, > ctest, etc.) using something short of recompiling a special > Windows version of R. Is this possible? I examined the > autoload() command but this seems to target a single command > of package, and only apply during a single run of R. Is > there an initiation text file I could modify? I can find no > mention in the documentation of how this might be done. > > Thanks, > Rob > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide!http://www.R-project.org/posting-guide.html Simon Fear Senior Statistician Syne qua non Ltd Tel: +44 (0) 1379 644449 Fax: +44 (0) 1379 644445 email: Simon.Fear at synequanon.com web: http://www.synequanon.com Number of attachments included with this message: 0 This message (and any associated files) is confidential and\...{{dropped}}
Hi, go to your C:/R/rw1080/etc directory and edit the Rprofile file adding (e.g.): library(foreign) library(survival) cheers, antonio rodriguez> -----Mensaje original----- > De: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]En nombre de imap > Enviado el: martes, 20 de enero de 2004 16:16 > Para: r-help at stat.math.ethz.ch > Asunto: [R] Loading packages at startup > > > Hi, > > I use the Windows R GUI. I frequently use (or have my students > use) foreign and survival packages. I would like to make them > part of the basic start-up package set (like base, ctest, etc.) > using something short of recompiling a special Windows version of > R. Is this possible? I examined the autoload() command but this > seems to target a single command of package, and only apply > during a single run of R. Is there an initiation text file I > could modify? I can find no mention in the documentation of how > this might be done. > > Thanks, > Rob > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.564 / Virus Database: 356 - Release Date: 19/01/2004 >---
Maybe Matching Threads
- Recommended way to change defaultPackages under Windows
- R 1.7.0: Startup error: Error in "class<-"(*tmp*, value = Class) : couldn't find function "objWithClass"
- plot, plot, methods, crash (PR#5173)
- scan() crash in Windows 98 (PR#3234)
- Unintended loading of package:datasets