From jmc@research.bell-labs.com  Wed Sep 11 16:56:46 2002
From: jmc@research.bell-labs.com (John Chambers)
Date: Wed, 11 Sep 2002 11:56:46 -0400
Subject: Installing packages using methods: was Re: setGeneric(); R CMD check
References: <20020910150946.B2319@jessie.research.bell-labs.com> <3D7F4948.B0689BCC@research.bell-labs.com> <3D7F4BB0.E724BD5F@research.bell-labs.com>
Message-ID: <3D7F67BE.7E76ADF@research.bell-labs.com>

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


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