Microsoft's CRAN time machine helped solved this, but I think they've recently shut it down and I don't really trust Posit to not have a version behind a paywall.
If you have used Cargo/npm/any Python package manager/etc, it will be very familiar.
Microsoft's CRAN time machine helped solved this, but I think they've recently shut it down and I don't really trust Posit to not have a version behind a paywall.
What the CRAN time machine (and now Posit Package Manager) does is take that compatibility guarantee, and freeze it so you have access to all the same, compatible, packages at any moment in time.
While I personally do use PPM fairly extensively, I do understand the paywall concern for long-term reproducibility so `rv` can help you here, with a bit of manual massaging. I'd recommend setting the repositories section of the config file to be a snapshot date in PPM that contains the package version(s) you're interested in and then installing using that repository (taking the benefit of that CRAN guarantee), then in both the config file and `rv.lock`, replace all the references to the PPM repo with your preferred CRAN mirror. This will allow you to resolve to compatible package versions, but then for your POSIT concern, will still be able to reproduce using the CRAN archive.
For example: https://packagemanager.posit.co/cran/2025-03-02
You can browse available snapshot dates here: https://packagemanager.posit.co/client/#/repos/cran/setup?sn...
This also works for PyPI and Python packages: https://packagemanager.posit.co/pypi/2025-03-04/simple