R Under development (unstable) (2023-11-16 r85542 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > # Get the 'R CMD check' status, if any > status <- R.utils::queryRCmdCheck() > print(status) [1] "checkingTests" attr(,"evidences") attr(,"evidences")$R_CMD_CHECK [1] FALSE attr(,"evidences")$vanilla [1] TRUE attr(,"evidences")$pwd [1] TRUE attr(,"evidences")$examples [1] FALSE > > if (status != "notRunning") { + cat("The current R session was launched by R CMD check. Status:", status, "\n") + } else { + cat("The current R session was not launched by R CMD check.\n") + } The current R session was launched by R CMD check. Status: checkingTests > > # Display how R was launched > print(base::commandArgs()) [1] "D:\\RCompile\\recent\\R/bin/x64/Rterm.exe" [2] "-f" [3] "queryRCmdCheck.R" [4] "--restore" [5] "--save" [6] "--vanilla" > > # Display loaded packages etc. > print(search()) [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base" > > # Display current working directory > print(getwd()) [1] "d:/RCompile/CRANincoming/R-devel/R.utils.Rcheck/tests" > > proc.time() user system elapsed 0.29 0.06 0.34