Site icon R-bloggers

Ensure R Language Reproducibility with dateback Package

[This article was first published on R | r4stats.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Sooner or later, most R programmers end up with code that no longer runs because of package updates. One way to address the problem was the MRAN Time Machine which Microsoft retired on July 1, 2023. You can get similar functionality for source packages using “dateback,” thanks to Ryota Suzuki. As with MRAN, examples of when you could benefit from using dateback include:

Let’s consider an example. There are three options to install a source package, “ranger.”

Using CRAN:

install.packages("ranger", 
  repos = "https://cloud.r-project.org", type = "source")

Using MRAN Time Machine:

install.packages("ranger", 
  repos = "https://cran.microsoft.com/snapshot/2023-03-01/", 
  type = "source")

Using dateback (with CRAN):

dateback::install("ranger", date = "2023-03-01", 
  repos = "https://cloud.r-project.org")

They ALL get “ranger” and its dependencies (Rcpp and RcppEigen). The differences are:

Of course, we can manually search on CRAN and find desired versions. But it makes a huge difference when we install a package with many complicated dependencies (like a package X depends on Y and Z, Y depends on P and Q, and so on). The number of packages needed can run into the dozens. With dateback, you don’t need to worry about what they are or how many.

Ryota is also the lead developer for R AnalyticFlow, the only workflow-style graphical user interface for R. You can download that for free here and read my review of it here. How it compares to other R GUIs is summarized here. Thanks to Ryota for most of the information in this post!

The post Ensure R Language Reproducibility with dateback Package first appeared on r4stats.com.
To leave a comment for the author, please follow the link and comment on their blog: R | r4stats.com.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Exit mobile version