[R-pkg-devel] R CMD check works but with devtools::check() examples fail
j@r|@ok@@nen @end|ng |rom ou|u@||
Thu May 16 12:18:31 CEST 2019
I think this is because the check systems set different environmental variables. I had the same problem in February, and found out that R 3.6.0 (then still to come) adds new environmental variable _R_CHECK_LENGTH_1_LOGIC2_. This *is* documented, but the documentation is well hidden in R-internals manual. It says (or said when I looked at this in early February):
Optionally check if either argument of the binary operators && and || has length greater than one. The format is the same as for _R_CHECK_LENGTH_1_CONDITION_. Default: unset (nothing is reported)
R has for ages wanted that condition if(A && B) should have length 1, but with this variable set, it also wants both A and B have length one (which is not the same thing). You need to find the place where this does not happen and fix that. If you look at the end of the error message, it even says in which case you have a length>1 component in your condition (it is given as length 3 in the diagnostic output).
I found this then because win-builder set this environmental variable, and there may be other build systems that do the same. You should fix the cases to avoid trouble.
Cheers, Jari Oksanen
On 16 May 2019, at 13:08, Gábor Csárdi <csardi.gabor using gmail.com<mailto:csardi.gabor using gmail.com>> wrote:
On Thu, May 16, 2019 at 10:56 AM Jack O. Wasey <jack using jackwasey.com<mailto:jack using jackwasey.com>> wrote:
Agree with Dirk, and also you are running R CMD check on the current
Why do you think so? Don't the lines below the "-- Building" header
mean that devtools/rcmdcheck is building the package?
── Building ─────────────────────────────────────────────────────────
Setting env vars:
● CFLAGS : -Wall -pedantic -fdiagnostics-color=always
● CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
● CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
checking for file
─ preparing ‘rdtLite’:
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘rdtLite_1.0.3.tar.gz’
── Checking ─────────────────────────────────────────────────────────
R-package-devel using r-project.org<mailto:R-package-devel using r-project.org> mailing list
[[alternative HTML version deleted]]
More information about the R-package-devel