Skip to content
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

Use %||% from base R #1402

Closed
PavelBal opened this issue Apr 25, 2024 · 3 comments
Closed

Use %||% from base R #1402

PavelBal opened this issue Apr 25, 2024 · 3 comments

Comments

@PavelBal
Copy link
Member

In R 4.4.0, %||% is supported natively. Currently, we are re-exporting it from purrr::%||%`

L %||% R newly in base is an expressive idiom for the phrases if(!is.null(L)) L else R or if(is.null(L)) R else L.

In one of the future releases, we should make ospsuite-r depend on R >= 4.4.0 and use the base function for this.

@Yuri05
Copy link
Member

Yuri05 commented Apr 25, 2024

At least for us, the code should work with R 4.3

@PavelBal
Copy link
Member Author

Yes, "in one of the future releases", I hope you will upgrade to >=4.4.0 before 2030 :-P

@pchelle
Copy link
Contributor

pchelle commented Oct 22, 2024

I noticed the issue is the same as #1486
Closing this one as the other provides more info about %||%

@pchelle pchelle closed this as completed Oct 22, 2024
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

No branches or pull requests

3 participants