The renv package is a new effort to bring project-local R dependency management to your projects.
There are three commands to do it.
- ·renv::init()·, in rstudio, when you build a project, you can check this option
- Call ·renv::snapshot()· to save the state of the project library to the lockfile, save the packages dependency
- Update by using the ·renv::snapshot()·, if have problem, go back by using renv::restore().
Reference:
站在巨人的肩膀,去学习