[R] Package structure question (resolution)

John W Emerson john.emerson at yale.edu
Thu Jun 22 21:19:22 CEST 2006


Thanks to Max Kuhn, Jeff Laake, Duncan Murdoch, and
Dirk Eddelbuettel, for their tips that eventually
helped me get my teeth around this one.

I'm in the process of documenting my experience, in case
others find it useful.  Please email me if you want to add
to this or clarify anything.

However, to close this thread, in a nutshell, working in Linux:

1. package.skeleton().
2. Make obvious changes to files.
3. R CMD check packagename.
4. R CMD build --binary packagename.
5. The result of 4 should be a working Linux package, .tar.gz.
6. Unpack the .tar.gz file by hand, and zip the resulting directory.
7. The result of 6 should be a working Windows package, .zip.

If there is an easier way to get both the Linux and Windows
packages (without installing any extra specialized tools),
I'd be interested.

Problems encountered:

1. The --binary option seems necessary now, but perhaps it
wasn't in earlier versions?  Not sure.  This may have resulted
in my quick success in Linux (where we are running an older
version of R), but problems in Windows (newer version).

2. In the process of making early mistakes, my Windows installation
was corrupted by some odd folders in R/library that generated
the following error message:

> utils:::menuInstallLocal()
updating HTML package descriptions
Warning message:
no package 'file678418be' was found in: packageDescription(i, lib.loc =
lib, field = "Title", encoding = "UTF-8")

I'm hesitant to call this a bug (because there might be a good reason
for it), but the solution was simply to delete the folders named
things like "file678418be" inside R/library.  After doing this I
had no problem, though.  Go figure.

Cheers,

Jay



More information about the R-help mailing list