From wdunlap at tibco.com  Tue Mar 12 20:05:12 2013
From: wdunlap at tibco.com (William Dunlap)
Date: Tue, 12 Mar 2013 19:05:12 +0000
Subject: [Rd] duplicate export entries in NAMESPACE
Message-ID: <E66794E69CFDE04D9A70842786030B931B91337E@PA-MBX04.na.tibco.com>

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



[Rd] duplicate export entries in NAMESPACE
William Dunlap