Skip to content
Prev 42986 / 63421 Next

CRAN policies

It looks like you define a few functions that use substitute() or sys.call()
or similar functions to look at the unevaluated argument list.  E.g.,

  "cq" <-
  function( ...) {
  # Saves putting in quotes!
  # E.G.: quoted( first, second, third) is the same as c( 'first', 'second', 'third')
  # wrapping by as.character means cq() returns character(0) not list()
    as.character( sapply( as.list( match.call( expand.dots=TRUE))[-1], as.character))
  }
%such.that% and %SUCH.THAT% do similar things.

Almost all the complaints from check involve calls to a handful of such
functions.  If you could tell codetools:::checkUsage that that these functions
did nonstandard evaluation on all or some of their arguments then the
complaints would go away and other checks for  real errors like misspellings
would still be done.

Another possible part of the problem is that if checkUsage is checking a function like
  f <- function(x) paste(x, cq(suffix), sep=".")
it attributes the out-of-scope suffix problem to 'f' and doesn't mention that the immediate
caller is 'cq', so you cannot easily filter output complaints about cq.  (CRAN would
not do such filtering, but a developer might.)

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com