Last active
January 31, 2017 18:18
-
-
Save datalove/88f5a24758b2d8356e32 to your computer and use it in GitHub Desktop.
How to take an R function that isn't generic, make it generic and add method for your class without breaking the standard functionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
identical <- function(x) UseMethod("identical") | |
identical.my_class <- function(x) do_something(x) | |
identical.default <- base::identical |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment