If you enjoyed this video and want to level up your R skills even further, check out my latest video courses: 📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/ 📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
Thanks for the helpful guide! Could you please show, in a future video, how to deal with new versions of packages becoming available? For example, if I had a Quarto document that used an old version of a package, and I want to upgrade it to use a feature in the new package? I’ve done something similar with python and venv, so would be interested to see how it could work in R with renv. I think it was really helpful for me to understand why virtual environments and lock files are important and powerful - especially for reproducibility and for deployment in different environments!
I thought renv doesn’t have multiple copies of same version packages (across projects). Rather, if it is already installed then a new project requiring that package (and specific version) links to that pre-installed version? So, there could be something like an renv store/library as well as a global? Trying to understand why packages existing in global aren’t linked to unless different version
@ I didn’t get it quite right. Quote from docs: If you use renv for multiple projects, you’ll have multiple libraries, meaning that you’ll often need to install the same package in multiple places. It would be annoying if you had to download (or worse, compile) the package repeatedly, so renv uses a package cache. That means you only ever have to download and install a package once, and for each subsequent install, renv will just add a link from the project library to the global cache. You can learn more about the cache in vignette("package-install").
If you enjoyed this video and want to level up your R skills even further, check out my latest video courses:
📍Data Cleaning Master Class at data-cleaning.albert-rapp.de/
📍Insightful Data Visualizations for "Uncreative" R Users at arapp.thinkific.com/courses/insightful-data-visualizations-for-uncreative-r-users
5:15 I would introduce libpath to demonstrate this idea.. great vid. Renv is Great
Ahh you're right. Clearly I missed an opportunity there 😅
Thanks for the helpful guide! Could you please show, in a future video, how to deal with new versions of packages becoming available? For example, if I had a Quarto document that used an old version of a package, and I want to upgrade it to use a feature in the new package? I’ve done something similar with python and venv, so would be interested to see how it could work in R with renv. I think it was really helpful for me to understand why virtual environments and lock files are important and powerful - especially for reproducibility and for deployment in different environments!
I thought renv doesn’t have multiple copies of same version packages (across projects). Rather, if it is already installed then a new project requiring that package (and specific version) links to that pre-installed version? So, there could be something like an renv store/library as well as a global? Trying to understand why packages existing in global aren’t linked to unless different version
@@DM-py7pj interesting 😯 I thought it's one standalone library per project. Possibly renv has some optimization going on here 🤔
@ I didn’t get it quite right.
Quote from docs:
If you use renv for multiple projects, you’ll have multiple libraries, meaning that you’ll often need to install the same package in multiple places. It would be annoying if you had to download (or worse, compile) the package repeatedly, so renv uses a package cache. That means you only ever have to download and install a package once, and for each subsequent install, renv will just add a link from the project library to the global cache. You can learn more about the cache in vignette("package-install").
@@DM-py7pj Pretty cool optimization