From hb at stat.berkeley.edu  Tue Feb 16 13:30:13 2010
From: hb at stat.berkeley.edu (Henrik Bengtsson)
Date: Tue, 16 Feb 2010 13:30:13 +0100
Subject: [Rd] FYI: A case that the code validation of R CMD check misses
Message-ID: <59d7961d1002160430n4774bc65l8b1ba90b74c4b296@mail.gmail.com>

Hi,

I discovered a case where the code validation of R CMD check fails to
detect this issue.   If a non-existing is defined/assigned in the same
function as a non-existing object is used, it passes unnoticed.  For
example,

foo <- function(...) {
  nonExistingDummy1 <- nonExistingDummy1(...);
  nonExistingDummy2 <- nonExistingDummy2;
  res <- nonExistingDummy3(...);
  nonExistingDummy3 <- function(...) {};
}

gives

...
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK

Tested on Windows Vista with:

R version 2.10.1 Patched (2010-01-12 r50990)
R version 2.11.0 Under development (unstable) (2010-02-14 r51138)

Just a note

Henrik



[Rd] FYI: A case that the code validation of R CMD check misses
Henrik Bengtsson