[R] cyclic dependency error

Guy Brock guy.brock at louisville.edu
Mon Dec 10 06:25:39 CET 2007


Dear all, 
I am encountering a cyclic dependency error when running R CMD check on an R package I wrote (R version 2.6.1, Mac OS X 10.4), see the error message below.    

Creating a new generic function for "print" in "clValid"
Creating a new generic function for "summary" in "clValid"
Creating a new generic function for "plot" in "clValid"
Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : 
        cyclic name space dependencies are not supported
Error : package/namespace load failed for 'clValid'
Error: unable to load R code in package 'clValid'
Execution halted
ERROR: lazy loading failed for package 'clValid'
** Removing '/Users/guybrock/Documents/projects/DattaPackages/Cluster/clValid_0.5-4.Rcheck/clValid'


The NAMESPACE file is below,

.onLoad <- function(lib, pkg) require(methods)
importFrom(graphics, plot)
exportClasses(clValid)
exportMethods(clusters, clusterMethods, nClusters, measNames, measures, optimalScores, plot, print, show, summary)
S3method(print,sota)
S3method(plot,sota)
export(clValid, sota, dunn, connectivity, BHI, BSI, stability, matchGO)

My question is - how can I locate the source of the cyclic dependency error?  This is an updated version of a package which did not previously have this error, so somehow I introduced this in the modifications I made.  Note that R CMD check on Windows (R version 2.6.0) doesn't catch this, although R CMD build --binary fails on Windows with the same error.   

Thanks,
Guy



More information about the R-help mailing list