hadley / adv-r

Advanced R: a book
http://adv-r.hadley.nz
Other
2.35k stars 1.71k forks source link

Conditions of length greater than 1 result in an error since R 4.2.0 #1759

Closed heike closed 1 year ago

heike commented 1 year ago

Any conditions in if statements that have a length of > 1 are considered errors by default since R 4.2.0. Thanks, @HenrikBengtsson! https://github.com/HenrikBengtsson/Wishlist-for-R/issues/38

The value of _R_CHECK_LENGTH_1CONDITION will no longer be checked. This means that regardless of whether the condition is set or not, the command if (c(TRUE, FALSE)) 1 will result in an error.

I assign the copyright of this contribution to Hadley Wickham

hadley commented 1 year ago

And this one 😞 I guess I should've looked at the PRs before fixing the build problem myself!