On Wed, 29 Nov 2000 ASinclair@edfman.co.uk wrote:
> Another option in Splus 5 is to have a text file
> called .S.init in your home (login) directory.
> For this example it would just contain the line:
>
> library(MASS)
>
> According to the "green book" (Chambers, 1998, pg121, point 6)
> the initialization sequence of S will always run the commands
> in this file. However in Splus 5.1 for HP-UX I find this only
> works if I start Splus from my home direectory.
>
> Has anyone else experienced this problem or is it specific to
> my installation ? I thought that .S.init was a great idea
> and will be sad if it does not work as I thought it should.
Unfortunately, ou need to read MathSoft's documentation, not the green
book, which strictly describes a different system (S4). There a lot of
discrepancies.
This is described in the S-PLUS 5.1 release notes: you need to create
~/MySwork/.S.init, not ~/.S.init. Even better, you can use
~/MySwork/.S.chapters to specify chapters you want attached at startup.
(Note, I am not sure if .First.lib is run if a chapter is a library.)
MathSoft: the on-line docs could be a lot better for ?.S.init.
Even in S-PLUS 6.0 they do not seem to mention personal .S.init files.
And there is nothing on .S.chapters that I can find.
>
> Regards, Andrew
>
>
>
> -----Original Message-----
> From: ROGER NGOUENET [mailto:r.f.ngouenet@usa.net]
> Sent: Tuesday, November 28, 2000 5:34 PM
> To: Martin H. H. Stevens; Mailing List S+
> Subject: Re: [[S] loading libraries]
>
>
> To automatically perform actions when you start S-PLUS, create a .First.
> For example:
>
> .First <- function(){
> library(MASS) # I think mass is in upper case ...
> }
>
> You can view a complete help file by typing: ?.First or help(.First).
>
> Cheers, Roger.
>
>
> "Martin H. H. Stevens" <hstevens@rci.rutgers.edu> wrote:
> I have recently discovered the joys of the extra libraries in S-plus
> (e.g., mass, hmisc), and I have been liberated! I, and I am sure
> COUNTLESS others, are deeply indebted to the authors of these fabulous
> tools.
>
> I would like to load some libraries every time I start s-plus. How do I
> automate that?
> Many thanks,
> Henry
>
> --
> Dr. M. Henry H. Stevens
> Postdoctoral Associate
> Department of Ecology, Evolution, & Natural Resources
> 14 College Farm Road
> Cook College, Rutgers University
> New Brunswick, NJ 08901-8551
>
> email: hstevens@rci.rutgers.edu
> phone: 732-932-9631
> fax: 732-932-8746
>
>
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
> **********************************************************************
> Any information in this communication which is confidential must not
> be disclosed to others without our consent. Such consent is not required
> where the information is publicly available and intended for onward
> distribution. If the information is confidential and if you are not the
> intended recipient, you are not authorised to and must not disclose,
> copy, distribute, or retain this message or any part of it. You are
> requested to return this message to the sender immediately.
>
> Due to the electronic nature of e-mail, there is a risk that the
> information contained in this message has been modified.
> Consequently E D & F Man can accept no responsibility or
> liability as to the completeness or accuracy of the information.
>
> **********************************************************************
> ---------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
--
Brian D. Ripley, ripley@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 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
|