Skip to main content
100%

Gist 121968fa62b818079652160c129eaf3a

✓ Published0🌍 Public
RRobinL
Last edited Jun 16, 2017
Created on Jun 16, 2017

This example demonstrates how the R package `packrat` uses a global cache to speed up project initialization by symlinking installed packages instead of re-installing them. It shows the `packrat::init()` and `packrat::restore()` workflows, where previously cached packages are linked from a shared directory (`/home/willbowditch/R/packratcache`) into the project’s `packrat/lib` folder, as seen in the terminal output. The code also configures caching via `packrat::set_opts(use.cache=TRUE)` and reveals that direct `install.packages()` calls bypass the cache, overwriting symlinks. The visualization is a text-based log of file system operations, R commands, and package installation results, illustrating the cache’s behavior with concrete path and symlink details.

AI-generated description

Similar vizzes