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

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

Open
pchelle opened this issue Sep 3, 2024 · 4 comments
Open

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

pchelle opened this issue Sep 3, 2024 · 4 comments
Labels
question Further information is requested

Comments

@pchelle
Copy link
Contributor

pchelle commented Sep 3, 2024

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 |>

@pchelle pchelle added the question Further information is requested label Sep 3, 2024
@PavelBal
Copy link
Member

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

@Yuri05
Copy link
Member

Yuri05 commented Sep 20, 2024

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

@IndrajeetPatil
Copy link
Member

%||% 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/

@PavelBal
Copy link
Member

PavelBal commented Oct 1, 2024

%||% 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/

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants