A Chronicle of the Dangers of Time Traveling in R
renv::init()renv::snapshot()renv::restore()uv inituv add <python package>uv run script.pyuv syncinstall.packages() and friends.library(). CRAN
"https://cran.rstudio.com/"
attr(,"IDE")
[1] TRUE
renv::checkout(repo = ...)renv::checkout()renv::checkout(date = "yyyy-mm-dd")renv::checkout() also has a fast way to checkout from Posit Package Manager’s daily CRAN snapshotsrig add <version>, e.g. rig add 4.1.0 rig add releaserig default <version>, rig rstudio <version>rversions::r_versions() to figure out which R version was the release version on a given dateThe README says to use:
Then ignore cmdstanr:
Success!!
rv initrv add <R package>rv run script.R or work directly in Rrv syncSuccess!
Goso said, “A buffalo passes through a window. His head, horns, and four legs all go past. But why can’t the tail pass too?”
Pinning cmdstanr:
RUN R -e 'cmdstanr::install_cmdstan(dir = "/home/rstudio/.cmdstan", cpp_options = list("CXX" = "clang++"), version = "2.36.0")'
Pinning latex:
RUN Rscript -e 'tinytex::install_tinytex(version = "2025.02")'
...
RUN tlmgr repository set https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2024/tlnet-final
options(repos = "..."). Check your lock file to make sure renv is playing along.renv::checkout(date = "..."). In my experience, you may need to manually change repos in the lock file.rv configure repositoryrv migrate renvrversions::r_versions(): rig add <version>, rig default <version_name>rig add release and rig default release to update to today’s released version