You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can also install packages in any of the usual ways, i.e., `install.packages()` or `pak::pkg_install("ggplot2")`, but you'll have to complete an additional step to update the `lock` file enumerating packages and dependencies. A call to `renv::snapshot()` should suffice.
255
+
We can also install packages in any of the usual ways, i.e., `install.packages()` or `pak::pkg_install("ggplot2")` and `renv` will intercept and install it in the environment.
256
+
Then we need to run the `snapshot()` function to update the `renv.lock` file with all the packages installed.
257
+
258
+
```r
259
+
renv::snapshot()
260
+
```
256
261
257
262
Now we can open the `renv.lock` file and see that it stores a lot of machine-readable information in plain text. However, you could also <kbd>COMMAND</kbd>+<kbd>F</kbd> (MacOS) or <kbd>CTRL</kbd>+<kbd>F</kbd> (Windows) to double check that the packages installed are now listed.
258
263
@@ -266,19 +271,26 @@ Let's delete the packages we just installed and then restore them using the exis
0 commit comments