8  Tools

Next: , Previous: , Up: R Internals   [Contents][Index]

The behavior of R CMD check can be controlled through a variety of command line arguments and environment variables.

There is an internal --install=value command line argument not shown by R CMD check --help, with possible values

check:file

Assume that installation was already performed with stdout/stderr to file, the contents of which need to be checked (without repeating the installation). This is useful for checks applied by repository maintainers: it reduces the check time by the installation time given that the package has already been installed. In this case, one also needs to specify where the package was installed to using command line option --library.

fake

Fake installation, and turn off the run-time tests.

skip

Skip installation, e.g., when testing recommended packages bundled with R.

no

The same as --no-install : turns off installation and the tests which require the package to be installed.

The following environment variables can be used to customize the operation of check: a convenient place to set these is the check environment file (default, ~/.R/check.Renviron).

: If true, do not ignore compiler (typically GCC) warnings about non ISO C code in system headers. Note that this may also show additional ISO C++ warnings. Default: false.

: If true, give an error if suggested packages are not available. Default: true (but false for CRAN submission checks).

: If true, check Rd files for auto-generated content which needs editing, and missing argument documentation. Default: true.

: If true, check Rd line widths in usage and examples sections. Default: false (but true for CRAN submission checks).

: If true, check whether Rd usage entries for S3 methods use the full function name rather than the appropriate \method markup. Default: true.

: If true, check the cross-references in .Rd files. Default: true.

: If true, check the case of directories such as R and man. Default: true.

: Initial setting for --check-subdirs. Default: default’ (which checks only tarballs, and checks in the src only if there is no configure file).

: If true, make use of the codetools package, which provides a detailed analysis of visibility of objects (but may give false positives). Default: true (if recommended packages are installed).

: If true, record the output from installing a package as part of its check to a log file (00install.out by default), even when running interactively. Default: true.

: Maximum number of lines to show from the bottom of the output when reporting errors in running or re-building vignettes. ( Value 0 means all lines will be shown.) Default: 10 for running, 25 for re-building.

: Control whether codoc() testing is also performed on S4 methods. Default: true.

: Control whether the package code is scanned for .Internal calls, which should only be used by base (and occasionally by recommended) packages. Default: true.

: Control checking for executable (binary) files. Default: true.

: Control whether checking for executable (binary) files ignores files listed in the package’s BinaryFiles file. Default: true (but false for CRAN submission checks). However, most likely this package-level override mechanism will be removed eventually.

: Control whether permissions of files should be checked. Default: true iff .Platform$OS.type == "unix".

: Allows turning off checkFF() testing. If set to registration’, checks the registration information (number of arguments, correct choice of .C/.Fortran/.Call/.External) for such calls provided the package is installed. Default: true.

: Controls checkFF(check_DUP) Default: true (and forced to be true for CRAN submission checks).

: Control whether/how license checks are performed. A possible value is maybe’ (warn in case of problems, but not about standardizable non-standard license specs). Default: true.

: Control whether check_T_and_F() also looks for “bad” (global) T‘/F’ uses in examples. Off by default because this can result in false positives.

: Controls the minimum level for reporting warnings from checkRd(). Default: -1.

: Control whether some of the “lost braces” that checkRd() finds in LaTeX-like Rd contexts are reported (by raising their warning level to -1). This will often detect missing initial backslashes for Rd macros, unescaped in-text set braces, and \describe-style \item{label}{desc} entries within \itemize. Default: true.

: Control whether empty items inside \describe are allowed without a warning. This is a temporary stop gap measure meant to support legacy packages, and is likely to be removed in future versions of R. Default: false.

: If set to a non-empty value, a space-separated list of repositories to use to determine known packages. Default: empty, when the CRAN and Bioconductor repositories known to R is used.

: Control whether installation output is checked for compilation warnings about implicit function declarations (as spotted by GCC with command line option -Wimplicit-function-declaration, which is implied by -Wall). NB: implicit function declarations are errors in some recent C compilers, including Apple clang. Default: true from R 4.2.0, previously false.

: Control whether installation output is checked for compilation warnings about unused code constituents (as spotted by GCC with command line option -Wunused, which is implied by -Wall). Default: true.

: Control whether GFortran 4.0 or later -Wall warnings are used in the analysis of installation output. Default: false, even though the warnings are justifiable.

: If true, check R code for non-ascii characters. Default: true.

: If true, check data for non-ascii characters. En route, checks that all the datasets can be loaded and that their components can be accessed. Default: true.

: If true, check data for ascii and uncompressed saves, and also check if using bzip2 or xz compression would be significantly better. Default: true.

: Comma-separated list of architectures that will be omitted from checking in a multi-arch setup. Default: none.

: Comma-separated list of architectures that will be omitted from running tests in a multi-arch setup. Default: none.

: Comma-separated list of architectures that will be omitted from running examples in a multi-arch setup. Default: none.

: Should the unpacked package directory be checked for version-control directories (CVS, .svn …)? Default: true for tarballs.

: Should du be used to find the installed sizes of packages? R CMD check does check for the availability of du. but this option allows the check to be overruled if an unsuitable command is found (including one that does not respect the -k flag to report in units of 1Kb, or reports in a different format – the GNU, macOS and Solaris du commands have been tested). Default: true if du is found.

: Threshold used for _R_CHECK_PKG_SIZES_ (in Mb). Default: 5

: Should qpdf be used to check the installed sizes of PDFs? Default: true if qpdf is found.

: Should gs be used to check the installed sizes of PDFs? This is slower than (and in addition to) the previous check, but does detect figures with excessive detail (often hidden by over-plotting) or bitmap figures with too high a resolution. Requires that R_GSCMD is set to a valid program, or gs (or on Windows, gswin32.exe or gswin64c.exe) is on the path. Default: false (but true for CRAN submission checks).

: By default the output from running the R code in the vignettes is kept only if there is an error. This also applies to the build_vignettes.log log from the re-building of vignettes. Default: false.

: Should the vign_test directory be removed if the test is successful? Default: true.

: Should warnings about replacing imports be reported? These sometimes come from auto-generated NAMESPACE files in other packages, but most often from importing the whole of a namespace rather than using importFrom. Default: true.

: Check for calls that appear to tamper with (or allow tampering with) already loaded code not from the current package: such calls may well contravene CRAN policies. Default: true.

: Optionally report timings for installation, examples, tests and running/re-building vignettes as part of the check log. The format is [as/bs]’ for the total CPU time (including child processes) a’ and elapsed time b‘, except on Windows, when it is [bs]’. In most cases timings are only given for OK’ checks. Times with an elapsed component over 10 mins are reported in minutes (with abbreviation m‘). The value is the smallest numerical value in elapsed seconds that should be reported: non-numerical values indicate that no report is required, a value of 0’ that a report is always required. Default: "". (10 for CRAN checks unless set in the environment.)

: If timings are being recorded, set the threshold in seconds for reporting long-running examples (either user+system CPU time or elapsed time). Default: "5".

: For checks with timings enabled, report examples where the ratio of CPU time to elapsed time exceeds this threshold (and the CPU time is at least one second). This can help detect the simultaneous use of multiple CPU cores. Default: NA.

: Report for running an individual test if the ratio of CPU time to elapsed time exceeds this threshold (and the CPU time is at least one second). Not supported on Windows. Default: NA.

: Report if when running/re-building vignettes (individually or in aggregate) the ratio of CPU time to elapsed time exceeds this threshold (and the CPU time is at least one second). Not supported on Windows. Default: NA.

: Report if for installation the ratio of CPU time to elapsed time exceeds this threshold (and the CPU time is at least one second). Not supported on Windows, only uses if _R_CHECK_TIMINGS_ is set Default: NA.

: A string with comma-separated name=value pairs (with value a logical constant) giving additional arguments for the codetools functions used for analyzing package code. E.g., use _R_CHECK_CODETOOLS_PROFILE_="suppressLocalUnused=FALSE" to turn off suppressing warnings about unused local variables. Default: no additional arguments, corresponding to using skipWith = TRUE, suppressPartialMatchArgs = FALSE and suppressLocalUnused = TRUE.

: Check whether package is suitable for publication on CRAN. Default: false, except for CRAN submission checks.

: Include checks that require remote access among the above. Default: same as _R_CHECK_CRAN_INCOMING_

: When checking anchored Rd xrefs, use Rd aliases from the CRAN package web areas in addition to those in the packages installed locally. Default: false.

: Make the checks of compiled code more accurate by recording the symbol tables for objects (.o files) at installation in a file symbols.rds. (Only currently supported on Linux, Solaris, macOS, Windows and FreeBSD.) Default: true.

: Should the package code be checked for assignments to the global environment? Default: false (but true for CRAN submission checks).

: Should the package code be checked for calls to attach()? Default: false (but true for CRAN submission checks).

: Should the package code be checked for calls to data() which load into the global environment? Default: false (but true for CRAN submission checks).

: Should the package code be checked for the presence of the obsolete function .First.lib()? Default: false (but true for CRAN submission checks).

: Should the package code be checked for the presence of recently deprecated or defunct functions (including completely removed functions). Also for platform-specific graphics devices. Default: false (but true for CRAN submission checks).

: If set to warn‘, give a warning if examples etc open a screen device. If set to stop’, give an error. Default: empty (but stop’ for CRAN submission checks).

: If set to stop‘, give an error if a Windows-only device is used in example etc. This is only useful on Windows: the devices do not exist elsewhere. Default: empty (but stop’ for CRAN submission checks on Windows).

: Report on top-level files in the package sources that are not described in ‘Writing R Extensions’ nor are commonly understood (like ChangeLog). Variations on standard names (e.g. COPYRIGHT) are also reported. Default: false (but true for CRAN submission checks).

: Should the --use-gct use gctorture2(n) rather than gctorture(TRUE)? Use a positive integer to enable this. Default: 0.

: If set, check the usage of too many cores in package parallel. If set to warn’ gives a warning, to false’ or FALSE’ the check is skipped, and any other non-empty value gives an error when more than 2 children are spawned. Default: unset (but TRUE’ for CRAN submission checks).

: If set, check code usage (via package codetools) directly on the package namespace without loading and attaching the package and its suggests and enhances. Default: true (and true for CRAN submission checks).

: If set, check code usage (via package codetools) with only the base package attached. Default: true.

: If set to a true value, the check will exit on the first error. Default: false.

: If set to a true value, report already registered S3 methods in base/recommended packages which are overwritten when this package’s namespace is loaded. Default: false (but true for CRAN submission checks).

: Number of trailing lines of test output to reproduce in the log. If 0 all lines except the R preamble are reproduced. Default: 13.

: If set to a true value, report if the entry points to register native routines and to suppress dynamic search are not found in a package’s DLL. (NB: this requires system command nm to be on the PATH. On Windows, objdump.exe is first searched for in compiler toolchain specified via Makeconf (can be customized by environment variable BINPREF). If not found there, it must be on the PATH. On Unix this would be normal when using a package with compiled code (which are the only ones this checks), but Windows’ users should check. Default: false (but true for CRAN submission checks).

: If set to a true value, do not stop running tests after first error (as if command line option --no-stop-on-test-error had been given). Default: false (but true for CRAN submission checks).

: Run additional checks on the pragmas in C/C++ source code and headers. Default: false (but true for CRAN submission checks).

: If the package is installed and has C/C++/Fortran code, check the install log for non-portable flags (for example those added to src/Makevars during configuration). Currently -W flags are reported, except -Wall, -Wextra and -Weverything, and flags which appear to be attempts to suppress warnings are highlighted. See Writing portable packages in Writing R Extensions for the rationale of this check (and why even -Werror is unsafe).

Environment variable `_R_CHECK_COMPILATION_FLAGS_KNOWN_`{.env} can
be set to a space-separated set of flags which come from the R build
used for testing (flags such as `-Wall`{.sample .option} and
`-Wextra`{.sample .option} are already known). For example, for CRAN
builds of R \>= 4.0.0 on macOS one could use


``` R
_R_CHECK_COMPILATION_FLAGS_KNOWN_="-mmacosx-version-min=10.13" 
```

Default: unset.

: Check that any dependence on R is not on a recent patch-level version such as R (>= 3.3.3) since blocking installation of a package will also block its reverse dependencies. Possible values "note"‘, "warn"’ and logical values (where currently true values are equivalent to "note"‘). Default: false (but "warn"’ for --as-cran).

: Check that serialized R objects in the package sources were serialized with version 2 and there is no dependence on R >= 3.5.0’. (Version 3 is in use as from R 3.5.0 but should only be used when necessary.) Default: false (but true for CRAN submission checks).

: This checks if the package attempts to use R or Rscript from the path rather than that under test. It does so by putting scripts at the head of the path which print a message and fail. Default: false (but true for CRAN submission checks).

: If set to a true value, also check the R code in common unit test subdirectories of tests for undeclared package dependencies. Default: false (but true for CRAN submission checks).

: Check correct and portable use of SHLIB_OPENMP_*FLAGS in src/Makevars (and similar). Default: false (but true for CRAN submission checks).

: When checking examples, check for each example if connections are left open: if any are found, this is reported with a fatal error. NB: ‘connections’ includes most use of files and any parallel clusters which have not be stopped by stopCluster(). Default: false (but true for CRAN submission checks).

: Check if any of the input files has a timestamp in the future (and to do so, checks that the system clock is correct to within 5 minutes). Default: false (but true for CRAN submission checks).

: No longer in use: conditions of length greater than one in if or while statements are now an error.

: Should running the R code in the vignettes be skipped if vignette outputs are to be rebuilt (which will involve running that code). Default: true.

: Prior to R 3.6.0, re-building the vignette outputs was done in a single R session which allowed accidental reliance of one vignette on another (for example, in the loading of packages). The current default is to use a separate session for each vignette; this option allows testing the older behaviour, Default: true.

: As part of the ‘checking for future file timestamps’ enabled by --as-cran, check the system clock against an external clock to catch errors such as the wrong day or even year. Not necessary on systems doing repeated checks. Default: true (but false for CRAN checking).

: For packages with a configure file generated by GNU autoconf and either configure.ac or configure,.in, check that autoreconf can, if available, be run in a copy of the sources (this will detect missing source files and report autoconf warnings). Environment variable AUTORECONF controls the command used: it can give the full path to autoreconf (without spaces) and can include flags such as --warnings=obsolete (which is added for autoreconf version 2.68 or 2.69 and is the default for later versions). Default: false (but true for CRAN submission checks).

: Check whether file data/datalist is out-of-date. Default: false (but true for CRAN submission checks).

: Check and report at the end of the check run if files have been left in the check directory. Default: false (but true for CRAN submission checks).

: Check and report at the end of the check run if files would have been left in the temporary directory (usually /tmp on a Unix-alike). It does this by setting the environment variable TEMPDIR to a subdirectory of the R session directory for the check process: if any files or directories are left there they are removed. Since some of these might be out of the user’s control, environment variable _R_CHECK_THINGS_IN_TEMP_DIR_EXCLUDE_ can specify an (extended regex) pattern of file paths not to be reported – CRAN uses ^ompi.’ for directories left behind by OpenMPI. There are rare instances where TEMPDIR is not respected and so files are left in /tmp (and not reported, but see the next item): one example is /tmp/boost_interprocess on some OSes. Default: false (but true for CRAN submission checks).

: Check and report at the end of the check run if new files or directories are created in a selected set of directories during the check run. (This is confined to files owned by the user running the check process.) Currently the directories monitored are the home directory, /tmp (excluding RtmpXXXXXX directories), /dav/shm, ~/.cache (recursively) and ~/.local/share (recursively) or their equivalents on Windows and macOS (the directories in which the default settings for tools::R_user_dir() use a R subdirectory). Additional directories can be specified in environment variable _R_CHECK_THINGS_IN_OTHER_DIRS_XTRA_, separated by semicolons. Directories are reported with a trailing /’ on all platforms.

Environment variable `_R_CHECK_THINGS_IN_OTHER_DIRS_EXCLUDE_`{.env}
can specify an (extended regex) pattern of file paths not to be
reported -- this should match absolute file paths with home
represented by `~`{.sample .file}. For example, on a Linux system


``` R
'^~/.cache/(mozilla/firefox|mesa_shader_cache)/'
```

matches cache directories used by Firefox and OpenGL (and their
content). If the value starts with `@`{.sample .samp}' it is
considered as a filepath which is read with each line treated as a
pattern to be matched.

Note that other processes (include check runs in parallel) may
create new files in these directories which will get reported.
However, this optional check is very useful for narrowing down
possible packages which are leaving behind unexpected files.
Default: false

: Check the top-level scripts configure (unless generated by autoconf) and cleanup for non-Bourne-shell code, using the Perl script checkbashisms if available. This includes reporting scripts using the non-portable #! /bin/bash. (Script checkbashisms is available in most Linux distributions in a package named either devscripts’ or devscripts-checkbashisms’ and from https://sourceforge.net/projects/checkbaskisms/files.) Default: false (but true for CRAN submission checks except on Windows).

: Check if dependencies are orphaned packages. As from R 4.1.0 this checks strict dependencies recursively, so will report any orphaned packages which are needed to attach the package by library() as well as any orphaned packages which are suggested. Default: false (but true for CRAN submission checks).

: A positive integer. If set, give a NOTE if the number of imports from non-base packages exceed this threshold. Large numbers of imports make a package vulnerable to any of them becoming unavailable. Default: unset (but 20 for CRAN submission checks)

: If true and examples are found with \donttest sections, the tests are run in one pass with these commented out and then in a second pass including the \donttest sections, (for the main architecture only). Only for the first pass are the results compared to any .Rout.save file and timings analysed. Overridden by --run-donttest. Default: false unless --as-cran is specified (which can be overridden by setting _R_CHECK_DONTTEST_EXAMPLES_=false’).

: Check if packages used in ‘anchored’ cross-references in .Rd files (those of the form \link[pkg]{foo} and \link[pkg:bar]{foo}) are declared in the DESCRIPTION file and so these links can be checked. Default: false.

: Check if package-anchored Rd cross-references are to files (and not aliases). Default: false.

: If true and _R_CHECK_USE_CODETOOLS_ is also true, functions are scanned for use of return rather than return(). Default: false (but true for CRAN submission checks).

: By default, the check for a mismatch between the data length and the dimensions in a call to matrix gives a warning: setting this to a true value gives an error with a compact traceback. Default: false (but true for CRAN submission checks).

: Check if package code has if() condition which compare the class of an object to a string. See https://blog.r-project.org/2019/11/09/when-you-think-class.-think-again/ why this is a bad idea. Default: false (but true for CRAN submission checks).

: Check the validity of the package HTML help pages using HTML Tidy (https://www.html-tidy.org/) (if a suitable version is available on the system path for executables or its path is specified by environment variable R_TIDYCMD). macOS users are advised to install 5.8.0 or later from https://binaries.html-tidy.org/. Default: false (but true for CRAN submission checks). --as-cran can be overridden by setting this variable to a false value.

: Check whether HTML math rendering via KaTeX works (if package V8 is available). See https://blog.r-project.org/2022/04/08/enhancements-to-html-documentation/. Default: false (but true for CRAN submission checks).

: Check whether news() can successfully read package news in plain text (file NEWS) format. Default: false (but true for CRAN submission checks).

: Check whether arguments passed to the Windows C runtime are valid. When enabled and a C runtime function is called with an invalid parameter, R prints diagnostic information and unconditionally terminates. By default, R for Windows following MinGW-W64 default causes UCRT to ignore invalid parameters, but they may cause R to abort e.g. when R is embedded into applications built with a different compiler toolchain. One may set the value to "watson" for interactive debugging on Windows via _invoke_watson. Default: disabled.

: If set to a true value, trap non-interactive debugger invocations. These are most likely caused by leftover browser() statements in package code. Default: unset (but true for CRAN submission checks).

: If set to a true value, checking URLs show check status 301 for HTTP response status code “301 Moved Permanently”. Default: false (but true for CRAN submission checks).

: If set to a true value, checking for undocumented objects does not ignore objects with names starting with a dot (which prior to the advent of namespaces conventionally were considered as “internal”). Default: false (but true for CRAN submission checks).

: If set to a true value, checking S3 methods also notes “possible issues”, including issues with apparent methods not registered and methods registered for non-generics. Default: false (but true for CRAN submission checks).

: If set to a non-empty value, makes warnings from pdf() and postscript() about conversion failures from an MBCS (usually UTF-8) into errors. Unless the value is silent’, when the warnings are suppressed. Default: unset (but true for CRAN submission checks).

: If set to a non-empty value, makes installation warnings about non-UTF-8 strings in a package’s code (R/.*R) and help (man/*.Rd) files into errors. On most platforms invalid bytes in these files get converted to escapes (see iconv(sub = "byte")), but on others these lead to installation failure. Default: unset (but true for CRAN submission checks).

: If set to a true value, check whether Rd cross-references to targets not in the package itself or the base packages have package anchors. Default: false (but true for CRAN submission checks).

: If false report the use of non-ASCII strings marked as UTF-8, Latin-1 or "bytes" as part of checking data for non-ASCII characters’. Non-ASCII strings of unknown encoding are always reported. Default: true, but false prior on R 4.5.0.

The following variables control checks for undeclared/unconditional use of other packages. They work by setting up a temporary library directory and setting .libPaths() to just that and .Library, so are only effective if additional packages are installed somewhere other than .Library. The temporary library is populated by symbolic links22 to installed packages not also in .Library.

: If set to a true value and a test installation is to be done, this is done with a temporary library populated by all the Depends/Imports/LinkingTo packages. Default: false (but true for CRAN submission checks).

Note that this is actually implemented in `R CMD INSTALL`{.command},
so it is available to those who first install recording to a log,
then call `R CMD check`{.command}.

: If set to a true value, running examples, tests and vignettes is done with a temporary library directory populated by all the Depends/Imports/Suggests packages. (As exceptions, packages in a VignetteBuilder’ field are always made available.) Default: false (but true for CRAN submission checks: some of the regular checks use true and some use false).

: As for _R_CHECK_SUGGESTS_ONLY_ but using only Depends/Imports (and the exceptions, including test-suite managers in Suggests’). Default: false

: Apply _R_CHECK_DEPENDS_ONLY_ only to the check of loading from the data directory, so checks if any dataset depends on packages which are in Suggests or undeclared. Default: false (but true for CRAN submission checks)

_R_CHECK_DEPENDS_ONLY_EXAMPLES_
_R_CHECK_DEPENDS_ONLY_TESTS_

: Apply _R_CHECK_DEPENDS_ONLY_ only to the checking of examples, tests or vignettes. These can be used on their own, or with a false value to override _R_CHECK_DEPENDS_ONLY_. Default: the value of _R_CHECK_DEPENDS_ONLY_ or false if that is unset.

: If set to a true value, augment the previous checks to make recommended packages unavailable unless declared (even if installed in .Library). Default: false (but true for CRAN submission checks).

This may give false positives on code which uses
`grDevices::densCols`{.code} and `stats:::.asSparse`{.code} /
`stats:::.Diag`{.code} as these invoke
[**KernSmooth**](https://CRAN.R-project.org/package=KernSmooth){.url}
and [**Matrix**](https://CRAN.R-project.org/package=Matrix){.url}
respectively. (Those in **stats** are called from various contrasts
functions if `sparse = TRUE`{.code} is used.)

The CRAN submission checks use something like

_R_CHECK_CRAN_INCOMING_=TRUE
_R_CHECK_CRAN_INCOMING_REMOTE_=TRUE
_R_CHECK_VC_DIRS_=TRUE
_R_CHECK_TIMINGS_=10
_R_CHECK_INSTALL_DEPENDS_=TRUE
_R_CHECK_SUGGESTS_ONLY_=TRUE
_R_CHECK_NO_RECOMMENDED_=TRUE
_R_CHECK_EXECUTABLES_EXCLUSIONS_=FALSE
_R_CHECK_DOC_SIZES2_=TRUE
_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_=TRUE
_R_CHECK_CODE_ATTACH_=TRUE
_R_CHECK_CODE_DATA_INTO_GLOBALENV_=TRUE
_R_CHECK_CODE_USAGE_VIA_NAMESPACES_=TRUE
_R_CHECK_DOT_FIRSTLIB_=TRUE
_R_CHECK_DEPRECATED_DEFUNCT_=TRUE
_R_CHECK_REPLACING_IMPORTS_=TRUE
_R_CHECK_SCREEN_DEVICE_=stop
_R_CHECK_TOPLEVEL_FILES_=TRUE
_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_=TRUE
_R_CHECK_PRAGMAS_=TRUE
_R_CHECK_COMPILATION_FLAGS_=TRUE
_R_CHECK_R_DEPENDS_=warn
_R_CHECK_SERIALIZATION_=TRUE
_R_CHECK_R_ON_PATH_=TRUE
_R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_=TRUE
_R_CHECK_SHLIB_OPENMP_FLAGS_=TRUE
_R_CHECK_CONNECTIONS_LEFT_OPEN_=TRUE
_R_CHECK_FUTURE_FILE_TIMESTAMPS_=TRUE
_R_CHECK_AUTOCONF_=true
_R_CHECK_DATALIST_=true
_R_CHECK_THINGS_IN_CHECK_DIR_=true
_R_CHECK_THINGS_IN_TEMP_DIR_=true
_R_CHECK_BASHISMS_=true
_R_CHECK_ORPHANED_=true
_R_CHECK_BOGUS_RETURN_=true
_R_CHECK_MATRIX_DATA_=TRUE
_R_CHECK_CODE_CLASS_IS_STRING_=true
_R_CHECK_RD_VALIDATE_RD2HTML_=true
_R_CHECK_RD_MATH_RENDERING_=true
_R_CHECK_NEWS_IN_PLAIN_TEXT_=true
_R_CHECK_BROWSER_NONINTERACTIVE_=true
_R_CHECK_URLS_SHOW_301_STATUS_=true
_R_CHECK_UNDOC_USE_ALL_NAMES_=true
_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_=true
_R_CHECK_RD_NOTE_LOST_BRACES_=true
_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_=true

These are turned on by R CMD check --as-cran: the incoming checks also use

_R_CHECK_FORCE_SUGGESTS_=FALSE

since some packages do suggest other packages not available on CRAN or other commonly-used repositories.

Several environment variables can be used to set ‘timeouts’: limits for the elapsed time taken by the sub-processes used for parts of the checks. A value of 0 indicates no limit, and is the default. Character strings ending in s‘, m’ or h’ indicate a number of seconds, minutes or hours respectively: other values are interpreted as a whole number of seconds (with invalid inputs being treated as no limit).

: The default timeout for sub-processes not otherwise mentioned, and the default value for all except _R_CHECK_ONE_TEST_ELAPSED_TIMEOUT_. (This is also used by tools::check_packages_in_dir.)

: Limit for when R CMD INSTALL is run by check.

: Limit for running all the examples for one sub-architecture.

: Limit for running one test for one sub-architecture. Default _R_CHECK_TESTS_ELAPSED_TIMEOUT_.

: Limit for running all the tests for one sub-architecture (and the default limit for running one test).

: Limit for running the R code in one vignette, including for re-building each vignette separately.

: Limit for re-building all vignettes.

: Limit for each attempt at building the PDF package manual.

Another variable which enables stricter checks is to set R_CHECK_CONSTANTS to 5. This checks that nothing23 changes the values of ‘constants’24 in R code. This is best used in conjunction with setting R_JIT_STRATEGY to 3, which checks code on first use (by default most code is only checked after byte-compilation on second use). Unfortunately these checks slow down checking of examples, tests and vignettes, typically two-fold but in the worst cases at least a hundred-fold.

The following environment variables can be used to customize the operation of INSTALL.

: If true, give an error if installing only package libraries via --libs-only and some package imported or depended on is not available. Default: true (false only for special applications, which analyze native code of packages).