[R] Homemade packages.

Rolf Turner rolf at math.unb.ca
Wed Jan 2 17:12:28 CET 2002


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



More information about the R-help mailing list