Skip to content
Prev 274398 / 398506 Next

finding the code underneath a generic function

On Oct 13, 2011, at 9:31 PM, R. Michael Weylandt wrote:

            
With the added strategy of using either getAnywhere() or the triple  
colon ":::" methods to get at S3 methods code that is not made  
visible. Notice that if you use:

methods(plot)
getAnywhere(plot.data.frame)

OR:
?plot.data.frame # to figure out which package name to use
graphics:::plot.data.frame

And then there are the S4 methods, but if you needed to ask this  
question, you may not be ready for S4 methods. Uwe Ligges wrote an  
artilc with atitle along ht elines of "Getting to the Sources" in the  
R-News a few years ago that is more complete. There it is, number 142:

http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf