
Last chance! 50% off unlimited learning
Sale ends in
getS3method(f, class, optional = FALSE, envir = parent.frame())
environment
in which the method and its
generic are searched first.NULL
if no function is found and
optional = TRUE
.
get
: this function can retrieve
such functions, primarily for debugging purposes.Further, S3 methods can be registered on the generic when a namespace is loaded, and the registered method will be used if none is visible (using namespace scoping rules).
It is possible that which S3 method will be used may depend on where
the generic f
is called from: getS3method
returns the
method found if f
were called from the same environment.
methods
, get
, getAnywhere
require(stats)
exists("predict.ppr") # false
getS3method("predict", "ppr")
Run the code above in your browser using DataLab