Open-Systems-Pharmacology / OSPSuite-R

R package for the OSPSuite
https://www.open-systems-pharmacology.org/OSPSuite-R/
Other
29 stars 12 forks source link

Use `%||%` from base R #1402

Closed PavelBal closed 1 month ago

PavelBal commented 7 months ago

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 commented 7 months ago

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

PavelBal commented 7 months ago

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

pchelle commented 1 month ago

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