I use the Revolution R Enterprise distribution that is built upon R 3.2.2. Hence, I have an interest in only employing package versions that are based on this R release as well. Checking packages like 'checkpoint' or the Revolution MRAN page, I only found ways to access snapshots of CRAN datewise. Is there a way to install the most recent package versions still compatible with a certain R release?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I found a heuristical solution to my own problem:
- Find out about the release date of the stable R version succeeding your working version.
- Set up an R script that calls all the packages you need for your project via individual
library()
orrequire()
calls. - Use
checkpoint(release date minus at least one day)
to automatically create a project specific library which is in harmony with your working R version.
Step 2 is a failsafe way to ensure detection of all necessary packages. I called them by sapply(package.list, require)
, which checkpoint()
was not able to handle. A possible caveat against this solution might be that it possibly does not deliver the very last version of a package which is still compatible with your older R version. Alternatively, to be very sure, instead of the stable release one could use the prerelease date to be absolutely sure about compatibility.