isCRANcheck(...) isCRAN_timing() isCHECK()
'timing'
Check if the environment variable
_R_CHECK_TIMINGS_
is set, as with the flag
'--timing'
was set. 'cran'
Check if
the environment variable _R_CHECK_CRAN_INCOMING_
is set, as with the flag '--as-cran'
was set. isCRANcheck
tries to identify if one is running
CRAN checks.
isCRAN_timing
tells if one is running CRAN check
with flag '--timing'
.
isCHECK
checks both CRAN expected flags and the
value of environment variable
_R_CHECK_RUNNING_UTESTS_
. It will return
TRUE
if such variable is set to anything not
equivalent to FALSE
. For example, the function
utest
sets it to the name of the package
being checked
(_R_CHECK_RUNNING_UTESTS_=
), but unit
tests run as part of unit tests vignettes are run with
_R_CHECK_RUNNING_UTESTS_=FALSE
, so that developers
cann run all tests.
Currently isCRANcheck
returns TRUE
if the
check is run with either environment variable
_R_CHECK_TIMINGS_
(as set by flag
'--timings'
) or _R_CHECK_CRAN_INCOMINGS_
(as set by flag '--as-cran'
).
Note that the checks performed on CRAN farms are not always run with such flags, so there is no guarantee this function identifies such runs, and one should rely custom environment variables to enable specific tests or examples.
Adapted from the function CRAN
in the fda
package.
isCHECK()[1] FALSE