What are the main limits to R in a production environment?

packrat is nice but if you want a particular version of package (or not to update some packages) you might encounter difficulties …
In general, packrat and versioning is hard and not maintainable in the long term.

So I definitely agree that packrat has its difficulties, but I wanted to be clear (cf. @xhudik) that it can handle a particular version of a package, not updating packages, etc. so long as your computer can install packages from source. "difficulties" is the operative word in his comment - IMO they are not insurmountable difficulties, though. As mentioned, dependencies on third party tools outside of the R universe (cf. Selenium above, @s_maroo) would need to be handled separately.

Packrat also has an advantage over MRAN in that it can include versions of locally developed packages (not on CRAN) and git repos. In the past, I have used the drat package to build local CRAN-like repositories of locally developed packages. Also, after getting used to some of the nuances of packrat, I really like that it declares explicit version numbers (like requirements.txt) and does make my code stable / reproducible using CRAN's archived package sources.

@konradino A budding discussion on guidelines for using R in production is here.

5 Likes