[R] My_first_R_package: almost there

Agustin Lobo alobo at ija.csic.es
Tue Jun 26 14:10:00 CEST 2001


Well, thanks to you all
I've been able to install my first
little package. I've dumped
some of my Splus(PC) functions
to an ascii file (*.R), created
the directory structure and the
DESCRIPTION and INDEX files. Then
I checked and installed with:

R CMD INSTALL -l ~/.R/library Sutilpangea

because I found that I have an .R directory
in my home where a subdirectory .R/library
has links to where the packages really are
(/usr/lib/R/library). Therefore, I decided
to keep  my own packages in .R/library
while the CRAN packages really stay in
/usr/lib/R/library.

Now the only problem is that, by default, R
searches packages in /usr/lib/R/library
because of the value of R_HOME:

> system ("echo $R_HOME")
/usr/lib/R

It would be better if R would
search packages in my .R/library
directory, where R would find both my packages
and the links for the CRAN packages.
How can I change the deafault searching
path for the packages? (I know
I can always do library(xxx, lib.loc="/home/alobo/.R/library"),
but it would be nicer having this as default).

Thanks

Agus

Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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