Using Renv
- Create a project
- Call
renv::init()
to create a standalone library - Call
renv::activate()
this happens automatically if using RStudio projects - Install necessary packages with traditional syntax
install.packages("dplyr")
- Call
renv::snapshot()
to track versions etc.
“* Lockfile written to ‘~/git_repos/bookclub-do4ds/renv.lock’.”
Now you have a file called renv.lock which has been updated with the project’s packages and their versions:
*see book for python equivalent i.e. virtualenv/venv and requirements.txt