The "Writing R Extensions" manual says that
"R CMD check" can be customized
"by setting environment variables
_R_CHECK_*_:, as described in" the
Tools section of the "R Internals" manual.
'R CMD check' was tested with
R 3.0.1 under Fedora 18 Linux and with
Rtools 3.0 from April 16, 2013 under
Windows 7. With the '--as-cran'
option, 7 matches were found; without it,
only 3 were found. These numbers were
unaffected by the presence or absence of the
'--timings' parameter. On this basis, the
default value of n_R_CHECK4CRAN was
set at 5.
1. x. <- Sys.getenv()
2. Fix CRAN_pattern and
n_R_CHECK4CRAN if missing.
3. Let i be the indices of
x. whose names match all the patterns
in the vector x.
4. Assume this is CRAN if
length(i) >= n_R_CHECK4CRAN.