r-hub / blog

The R-hub blog
https://blog.r-hub.io/
11 stars 12 forks source link

Minimum R version dependency in R packages - R-hub blog #159

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Minimum R version dependency in R packages - R-hub blog

https://blog.r-hub.io/2022/09/12/r-dependency/

etiennebacher commented 2 years ago

Nice post! To me, the first step to check whether my package depends on the correct version is to check the NEWS of R when I'm not sure when a function was introduced (or modified). This can be done here for R >= 4.0.0 and with news(package = "R-3") and news(package = "R-2") for R >= 3.0.0 and R >= 2.0.0 respectively.

cderv commented 2 years ago

when I'm not sure when a function was introduced (or modified).

Just to share that I am using this app for that https://hughjonesd.shinyapps.io/rcheology/ - Very useful ! In case it can be of interest to others...

etiennebacher commented 2 years ago

Yes, this one is very nice! I also wrote a small package (not on CRAN, not tested, etc.) that takes a function name and quickly prints the NEWS entries that contain it. Far from perfect but it does the job for me: https://github.com/etiennebacher/getnews

Bisaloo commented 2 years ago

Thanks for your comments! I usually go to backports README to determine if a function is going to require a more recent version but your options sound better! I'll give it a go next time I'm faced with this situation.