On 10/28/2009 3:14 PM, Ross Boylan wrote:
Here's a self-contained example of the problem:
foo <- function(obj) {return(3);}
setGeneric("foo")
[1] "foo"
removeGeneric("foo")
[1] TRUE
foo <- function(x) {return(4);}
args(foo)
function (x)
NULL
setGeneric("foo")
[1] "foo"
args(foo)
functio
R 2.8.1 on Windows behaves as I expected, i.e., the final args(foo)
returns a function of x. The previous example (below) was on Debian
GNU/Linux.
On Wed, 2009-10-28 at 12:14 -0700, Ross Boylan wrote:
> Here's a self-contained example of the problem:
>
> > foo <- function(obj) {return(3);}
> >
Here's a self-contained example of the problem:
> foo <- function(obj) {return(3);}
> setGeneric("foo")
[1] "foo"
> removeGeneric("foo")
[1] TRUE
> foo <- function(x) {return(4);}
> args(foo)
function (x)
NULL
> setGeneric("foo")
[1] "foo"
> args(foo)
function (obj)
NULL
R 2.7.1. I get the sam
Ross Boylan wrote:
> Originally I made a function yearStop that took an argument "object". I
> made a generic, but later changed the argument to "x". R keeps
> resurrecting the old definition. Could anyone explain what is going on,
> or how to fix it? Note particularly the end of the transcript
Originally I made a function yearStop that took an argument "object". I
made a generic, but later changed the argument to "x". R keeps
resurrecting the old definition. Could anyone explain what is going on,
or how to fix it? Note particularly the end of the transcript below: I
remove the generi