[R] R Package Building Question

Thomas Lumley thomas at biostat.washington.edu
Thu Mar 2 01:43:29 CET 2000


On Wed, 1 Mar 2000, Brett Presnell wrote:

> 
> 1. If this file is named R/sta4504 (with no extension), then when I
> build the package (under Solaris), create a zip file and install the
> package on a Windows PC, it works fine.  However, under Solaris,
> R INSTALL sta4504 hangs and does not complete the installation of the
> package.
> 
> 2. If this file is named R/sta4504.R, then the package installs and
> works fine on the Solaris machine, but the same package is not
> recognized as even existing by R under Windows.
> 
> I notice that most (all?) of the contributed packages leave off the
> extension, in spite of the advice to the contrary (at least to my
> reading) in Section 1.1.3 of "Writing R Extensions", and they all work
> on both platforms.  I don't remember ever seeing this come up on the
> list, so what am I missing?

What you're missing is that Unix packages are source code and Windows
packages are compiled. It's less obvious when there isn't any C or Fortran
code.  This is because typical Windows installations lack not only
compilers for C and Fortran but also the tools to process help pages.

In source form the package/R directory contains one or more files with
extensions .R (or .r, .q or various other possibilities), the package/src
directory has C or Fortran source code, package/man has .Rd files.

In compiled form package/R has a single file whose name is the name of the
package, the /src subdirectory is replaced by a /libs subdirectory with a
shared library, the /man subdirectory is replaced by one or more
subdirectories with various compiled help files.

So, sta4504.tgz should be a source package, with extensions, sta4504.zip
should be a compiled package, with no extensions.  There would be other 
differences if you had help pages for the functions.


	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle






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