[Rd] duplicate export entries in NAMESPACE

William Dunlap wdunlap at tibco.com
Tue Mar 12 20:05:12 CET 2013


Circa 80 CRAN and core-R packages have duplicate export entries in their NAMESPACE files.  E.g.,
  bit 1.1.9 : c("as.bit", "as.bitwhich", "as.which", "physical", "virtual")
  forecast 4.1 : "forecast.lm" 
  graphics 2.15.3 : "barplot" 
  mcmc 0.9.1 : "morph" 
  RCurl 1.95.3 : "curlOptions" 
  utils 2.15.3 : "RweaveLatexOptions"
Would it be helpful for 'check' to alert package writers to this?

I made the list using f():
  f <- function () 
  {
     for(pkg in installed.packages()[,"Package"]) {
        try( {
            exports <- parseNamespaceFile(pkg, R.home("library"))$exports
            if (any(dup <- duplicated(exports))) {
                cat(pkg, format(packageVersion(pkg)), ":", deparse(exports[dup]), "\n")
            }
        }, silent = TRUE)
     }
  }
I suppose it should also check for duplicates in S3method component, etc.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com



More information about the R-devel mailing list