RevolutionAnalytics / checkpoint

Install R packages from snapshots on checkpoint-server
164 stars 38 forks source link

Forward package compatibility #270

Closed Roberto236 closed 4 years ago

Roberto236 commented 6 years ago

Hi users, I'm checking my bases here before using checkpoint in a professional application. Will there ever be an issue with the version of R being incompatible with older checkpointed packages. For example, if I am using R 3.5.1 and use a package version the hasn't been updated since 3.4.3, it is possible that I can get an error message saying the version of the package is incompatible with the version of R. If I checkpoint back to a 3.4.3 version of a package, will I still get that error message, or has this been accounted for?

grssnbchr commented 6 years ago

Being just a user of checkpoint, my experience (and common sense) tells me exactly this, and it also makes sense, I think. Packages are "optimized", tried and tested with the current R version once they're released. For this reason, I always specify the R version when calling checkpoint(). See https://github.com/grssnbchr/rddj-template/blob/master/analysis/main.Rmd#install-packages.

It's not a big deal to compile old R versions (or use old binaries), anyway.

hongooi73 commented 4 years ago

As @grssnbchr says, there's no guarantee that a later R release will work with an earlier R package, although most of the time it's no problem.

Sometimes you can run into situations where R internals change sufficiently that you have to reinstall everything (R 3.5 -> 3.6 was one such change IIRC) -- but even then, the packages should still mostly work afterwards. Ultimately, the most stringent guarantee of back-compatibility would be to reinstall the older R release and use that.