Open-Systems-Pharmacology / OSPSuite-R

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

Do we still need `%||%` available in base R ? #1486

Open pchelle opened 3 weeks ago

pchelle commented 3 weeks ago

Not sure when the function was introduced in base R though. Depending on the compatibility issues, we might want to remove or keep it.

library(ospsuite)
#> Loading required package: rSharp
#> 
#> Attaching package: 'ospsuite'
#> The following object is masked from 'package:base':
#> 
#>     %||%

Created on 2024-09-03 with reprex v2.1.0

On a similar note, R v4.1. integrated the pipe in base R |>

PavelBal commented 1 week ago

@Yuri05 could you check if %||% is supported in R4.1? If so, we should remove our own implementation of it.

Yuri05 commented 1 week ago

AI tells that %||% is supported since R 3.5 :) And it works indeed in R 3.6 and R 4.1 (rlangmust be loaded first)

IndrajeetPatil commented 2 days ago

%||% was introduced in R 4.1:

Screenshot 2024-09-27 at 17 21 37

Btw, the best way to figure out what was introduced in what R version is to use the following app! 🙌

https://hughjonesd.shinyapps.io/rcheology/