Created
April 7, 2014 11:28
-
-
Save anonymous/10018579 to your computer and use it in GitHub Desktop.
A minimal example to create the "cyclic namespace dependency" error in R when creating and loading a package
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
setClass("myClass", slots=c(name="character", value="numeric")) | |
setGeneric("myMethod", function(object) standardGeneric("myMethod")) | |
setMethod("myMethod", "myClass", function(object) { | |
cat(object@name, "=", object@value) | |
}) | |
myMethod <- function(x,y) { | |
return(x,y) | |
} |
I also got caught by this one.
Even when they have a different number of arguments, this still causes the cyclic namespace error.
Thanks for the pointer!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear LORD! They should give you a Nobel prize! Thank you. I hate R when it comes to this 😄