-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRAN packages with 'length > 1 in coercion to logical' reports #93
Comments
Failure report
|
_R_CHECK_LENGTH_1_LOGIC2_="abort,verbose"; export _R_CHECK_LENGTH_1_LOGIC2_ ; make check # cran-check
|
_R_CHECK_LENGTH_1_LOGIC2_="abort,verbose"; export _R_CHECK_LENGTH_1_LOGIC2_ ; make test
|
Skipping the following two test files avoids the issue.
|
Will proceed with the above temporary solution (disabling tests that call |
What is one supposed to do if one actually want to to perform these operations on logical vectors? This issue trips on some of my input validation. I'm subsetting an object into chunks, by index numbers. (i < 1) provides a vector which is true for all indices too low, while (i >n) provides a vector which is true for all indices too high. What should I use instead of || since I wish to logically OR these vectors together, in order to report all the bad index numbers at once? EDIT: found the answer in help('||') having come from C, I'm used to | being bitwise rather than logical OR. |
Message from the CRAN maintainer:
NEWS for R-devel has
• Calling && or || with either argument of length greater than one
now gives a warning (which it is intended will become an error).
and checks with this made into a fatal error can be seen at
https://www.stats.ox.ac.uk/pub/bdr/LENGTH1/
with reproduction instructions in the 00README.txt file. (As this was made a fatal error, only the first error will be shown so please do run those instructions before re-submission.)
The problems are occurring in a different package and there is a table of which in that 00README.txt, In some cases, this is from misuse but you may need to contact the maintainer of the other package -- packages
have already been contacted but ignored us.
Please correct before 2022-04-04 to safely retain your package on CRAN.
The text was updated successfully, but these errors were encountered: