From jmc@research.bell-labs.com  Wed Sep 11 14:57:04 2002
From: jmc@research.bell-labs.com (John Chambers)
Date: Wed, 11 Sep 2002 09:57:04 -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>
Message-ID: <3D7F4BB0.E724BD5F@research.bell-labs.com>

John Chambers wrote:
................

> 
> The following snippet will _apparently_ install with or without --save:
> 
> ### Dummy Package
> require("methods")
> 
> foo <- function(x)x
> 
> setGeneric("foo")
> 
> setMethod("foo", "character", function(x) paste("++", x))
> ###
> 

By the way, an additional annoyance is that even with --SAVE, this
doesn't quite work always, because the `require("methods")' is only
active at INSTALL time, not when the image is loaded.  It would be nice
to make this carry over automatically as well, but how?

For now, the programmer needs to include the require("methods") in a
First.lib function in the package.



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

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