Skip to content

Instantly share code, notes, and snippets.

Created Apr 7, 2014
What would you like to do?
A minimal example to create the "cyclic namespace dependency" error in R when creating and loading a package
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) {
Copy link

giupo commented Nov 19, 2014

Dear LORD! They should give you a Nobel prize! Thank you. I hate R when it comes to this 😄

Copy link

wligtenberg commented Feb 18, 2015

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