Skip to content

Conversation

jonthegeek
Copy link
Contributor

Fixes #1828.

@jonthegeek
Copy link
Contributor Author

Evidently the NA + 1i behavior changed in R 4.4. I'll take a closer look when I get a minute.

@jonthegeek
Copy link
Contributor Author

Technically the test should fail on R < 4.4; before the change, NA + 1i became NA, which is a syntactic literal. Maybe split that last test into two versions with skip_if_not(as.numeric_version(paste0(R.version$major, ".", R.version$minor)) >= "4.4")) and `skip_if(as.numeric_version(paste0(R.version$major, ".", R.version$minor)) < "4.4")? Is there a more idiomatic way to express that in rlang?

@lionel-
Copy link
Member

lionel- commented Sep 23, 2025

@jonthegeek You can use:

testthat::skip_if_not_installed("base", "4.4")

@jonthegeek
Copy link
Contributor Author

@jonthegeek You can use:

testthat::skip_if_not_installed("base", "4.4")

Oh wow that makes sense and seems obvious now that I know it, but I wouldn't have thought of it! Thanks! Update incoming.

@lionel- lionel- merged commit 3057c42 into r-lib:main Sep 23, 2025
11 checks passed
@lionel-
Copy link
Member

lionel- commented Sep 23, 2025

Awesome, thanks a lot for your follow-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NA + 1i is not a syntactic literal

2 participants