Where to define S4 generics
You need to declare generic functions in S4 before you can define methods for them. If no definition exists you will see the following error: Generic functions are declared with the setGeneric() function, which must precede the call to setMethod(): But when you develop an R package you may have several classes that define their […]