packrat::init() removes system libraries from .libPaths()
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I dont know if this is intended, since I am just starting to figure out packrat. After I run packrat::init() most of my packages from the system library dissapear and my system libraries are removed from .libPaths(). This of course does not let me load any packages without reinstalling them from CRAN and then packrat wants me to update my system library again.
I run this code on a vanilla project:
.libPaths()
dim(installed.packages())
packrat::init()
.libPaths()
dim(installed.packages())
sessionInfo()
This is is my output. I get more or less the same when running the same code on 64 bit with windows 10.
I use the newest Rstudio 1.1.383 on both machines. The same thing happens when I create a new project in Rstudio using the packrat option.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the listed .libPaths(), installed.packages(), packrat::init(), and sessionInfo() sequence in a vanilla project. Then inspect the packrat::init() entry point and trace how it changes .libPaths(). Done means the system libraries are retained as expected, or the intended behavior is clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100