[Rd] .S4methods inconsistent behavior with methods, .S3methods

Richard Cotton richierocks at gmail.com
Thu Nov 3 09:07:26 CET 2016

If I call


I get the error

## Error in getGeneric(generic.function) :
##   argument 'f' must be a string, generic function, or primitive:
got an ordinary function

By contrast, methods and .S3methods just state that no methods are found.

## no methods found
## no methods found

It seems like the behavior of these functions ought to be consistent.

Maybe they should split the difference and say no methods are found,
but warn the the input is not generic?


Learning R

More information about the R-devel mailing list