[R] Date: Sat, 19 Oct 2002 09:44:55 +0800

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Sun Oct 20 11:59:08 CEST 2002


On Sun, 20 Oct 2002, chenwj wrote:

> thank you very much!
>
> but could you please explain more details about your 2 proposals,  'coz i'm
> completely new in R (especially for the second one)?

See ?Startup or the appropriate appendix to `An Introduction to R'.

Comment to Uwe: it is _not_ a good idea to tamper with .../etc/Rprofile,
as that is part of base (and base is now a namespace).  Use
.../etc/Profile.site or .Rprofile instead, each of which is sourced in the
user workspace.

Probably the best idea is to have a file .Rprofile containing the single
line

library(quantreg)

in the same directory as the R scripts you want to run. Then every time
you start Rterm _in that directory_, that .Rprofile will be run.

Note: for Classic MacOS users, there is no Rprofile.site despite what
?Startup says in R <= 1.6.0, so use the appendix to `An Introduction to
R'.


[I have proposed a simpler mechanism for this along the lines of S4's,
with a set of files like .Rpackages and Rpackages.site which contain a
list of packages to be loaded.  It's likely to get implemented for 1.7.0.]


> ----- Original Message -----
> From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de>
> To: "chenwj" <stop4optimal at hotmail.com>
> Cc: <r-help at stat.math.ethz.ch>
> Sent: Saturday, October 19, 2002 6:47 PM
> Subject: Re: [R] Date: Sat, 19 Oct 2002 09:44:55 +0800
>
>
> > chenwj wrote:
> > >
> > > hi all,
> > >
> > > i'v got a question here:
> > >
> > > i'm writing a *.bat file using Rterm.exe to several simliar R files,
> which
> > > all contain functions from some outside package (eg. quantreg).  my
> question
> > > is, how to invoke the package in my *.bat file.
> > >
> > > Anyone give a hand to me?
> > >
> > > regards,
> > > chenwj
> > >
> >
> > Write "library(quantreg)" in your R files, it cannot be done in the
> > Windows batch file.
> > Or, if you don't want to write it in each of your .R files, load the
> > package in .../etc/Rprofile, for example, so it is present everytime R
> > starts.
> >
> > Uwe Ligges
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-
> > r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> >
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._
> >
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list