When I type the function name of a generic in to my console, I expect to see a call to UseMethod
. For example, the documentation for determinant
calls it a generic and I get the following output when I type it in to my console:
> determinant
function (x, logarithm = TRUE, ...)
UseMethod("determinant")
<bytecode: 0x55fb617086b8>
<environment: namespace:base> #
The documentation for rep
makes a similar claim, but my console does not give similar output:
> rep
function (x, ...) .Primitive("rep")
And my attempts to extend rep have been unsuccessful.
This leaves me with two possibilities. Either I have a very bad understanding of R's generic functions or rep
is not a generic at all. Which is it?