[R] Homemade packages.

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 2 18:14:20 CET 2002


You shouldn't be installing into `.' You install packages into a *library*
and the default (R_HOME/library if R_LIBS is unset) is normally
sufficient.

Yes, if you install onto the sources it will now wipe out what it thinks
of as older and unnecessary files, and that is new in 1.4.0.


On Wed, 2 Jan 2002, Rolf Turner wrote:

>
> I've recently installed R-1.4.0 and I'm having the devil's own
> time trying to install a home-made package.  As far as I can tell,
> I'm doing the same things that I did previously, under 1.3.1, but
> somehow everything goes haywire.  (Quite possibly I'm simply
> mis-remembering what I did before, but I can't for the life of me
> figure out what to change).
>
> A toy example of what I did is as follows:
>
> 	- create a directory ``Junk'' in ~rolf/Rlib
>
> 	- inside Junk create files DESCRIPTION and INDEX
>
> 	- inside Junk create a directory R containing function
> 	  code files foo.R and bar.R
>
> 	- inside Junk create a directory man containing documentation
> 	  files foo.Rd bar.Rd
>
> 	- in the directory Rlib issue the command
>
> 		R CMD INSTALL -l . Junk
>
> I get the following response:
>
> 	Installing *source* package `Junk' ...
> 	 R
> 	cat: cannot open R/bar.R
> 	cat: cannot open R/foo.R
> 	cp: INDEX and /home1/faculty/rolf/Rlib/Junk/INDEX are identical
> 	cat: write error: Bad address
>  	help
> 	cat: cannot open man/bar.Rd
> 	cat: cannot open man/foo.Rd
>  	>>> Building/Updating help pages for package `Junk'
>      	Formats: text html latex example
>   	Junk                              text    html    latex
>  	DONE (Junk)
>
> 	DONE (INSTALL)
>
> Then inside Junk/R is the ***empty*** file ``Junk'' (and the
> files foo.R and bar.R have been removed); likewise inside Junk/man
> is the ***empty*** file ``Junk.Rd'' (and the files foo.Rd and bar.Rd
> have been removed).
>
> The fact that the original files were removed without trace is very
> disturbing --- could be (was, actually) a lot of work to replace them
> in a real example.
>
> Why on earth can't it open those files?
>
> What am I doing wrong?
>
> Version details:
>
>  > version
>          _
> platform sparc-sun-solaris2.7
> arch     sparc
> os       solaris2.7
> system   sparc, solaris2.7
> status
> major    1
> minor    4.0
> year     2001
> month    12
> day      19
> language R
>
> 					cheers,
>
> 						Rolf Turner
> 						rolf at math.unb.ca
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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