Installing packages using methods: was Re: setGeneric(); R CMD check

John Chambers jmc@research.bell-labs.com
Wed, 11 Sep 2002 11:56:46 -0400


Just to wrap up this thread, for now.

A section has been added to ?INSTALL with hints on installing packages
that use the methods package:

     Packages that require the methods package, and that use functions
     such as `setMethod' or `setClass', should be installed by creating
     a binary image.

     The package should require the methods package, both during
     installation and when the user attaches the package.  A good
     solution for most cases is to include the line
     `require("methods")' twice, once at the beginning of the package's
     R source, and once in the file `install.R' in the package
     directory (the top-level directory, not in the `R' directory below
     that).  The `install.R' file causes an image to be saved, and the
     contents will ensure that methods are available when the package
     is attached.

The suggestions seem to work, at least on some simple tests.  I'm not
aware of situations where this fails, but let me know otherwise.

The documentation should be in the next beta or rsync,  also in the
windows INSTALL help file (but I don't have a way to test that), plus a
pointer in the R-exts document to the online help page.

John
-- 
John M. Chambers                  jmc@bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._