From richierocks at gmail.com  Thu Nov  3 09:07:26 2016
From: richierocks at gmail.com (Richard Cotton)
Date: Thu, 3 Nov 2016 11:07:26 +0300
Subject: [Rd] .S4methods inconsistent behavior with methods, .S3methods
Message-ID: <CAPp_+=fwQf6VbNK4mb9sAWnJOKBuAJgWDMGNwJ9u-5FqdwOAMw@mail.gmail.com>

If I call

.S4methods(sd)

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.

methods(sd)
## no methods found
S3methods(sd)
## 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?

-- 
Regards,
Richie

Learning R
4dpiecharts.com



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