Assuming it's not unreasonable to expect that selectMethod() reflects what the "real dispatch mechanism" does, the former should be able to find what the latter has no problem finding. Unfortunately, this is not always the case. Here is an example:
> setGeneric("foo", function(x, y) standardGeneric("foo"))
> setMethod("foo", c("ANY", "ANY"), function(x, y) "YES")
> foo(1:4, letters)
> selectMethod("foo", c("integer", "character"))
Error in selectMethod("foo", c("integer", "character")) :
no method found for signature integer, character
This is a long standing bug that has been a source of frustration and confusion for many Bioconductor users for years (they've a hard time figuring out what method was actually called, which they need to know before they can access its man page).
But to make the report more useful for purposes of debugging, it appears to require two more conditions:
1- the signature must have 2 (or more?) arguments.
2- no non-default method has been defined for 2 arguments.
At least, either of the two variations on the example show no error:
- as provided, but selectMethod("foo", "integer")
- before calling selectMethod as in the example, set some actual 2-argument method: setMethod("foo", c("raw","raw"), function(x,y) "raw")
(a method for x only doesn't do)