-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
ROBUSTNESS: x & y should be x && y #434
Comments
I can do it. I do agree that programmatically speaking it is more correct that way but I can't see how it might be a problem. Actually in R I always use |
Sorry, I should have been more clear. Technically, yes, both work, if and only if, LHS and RHS are of length one. However, if one make a mistake somewhere causing one of them to have length > 1, using Current behavior in R: $ R --quiet --vanilla
> c(TRUE, FALSE) && TRUE
[1] TRUE
> Future/eventual behavior in R: $ _R_CHECK_LENGTH_1_LOGIC2_=true R --quiet --vanilla
> c(TRUE, FALSE) && TRUE
Error in c(TRUE, FALSE) && TRUE :
'length(x) = 2 > 1' in coercion to 'logical(1)' |
To clarify further; I did not spot this mistake in lidR; I just happened to see the code while troubleshooting #435 |
Understood. Thanks. I'm trying to use |
Hi, while troubleshooting some future devel issues regarding lidR, I spotted:
https://github.com/Jean-Romain/lidR/blob/82ef90be73cd3e8e86a49e8cb0d920e1fa751927/R/clusters_apply.R#L129
https://github.com/Jean-Romain/lidR/blob/82ef90be73cd3e8e86a49e8cb0d920e1fa751927/R/clusters_apply.R#L147
I think you meant to use
&&
(scalar) instead of&
(vector).The text was updated successfully, but these errors were encountered: