Create or document how to use multiple RStudio projects with one packrat folder
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
My coworkers and I, RStudio users, tend to have a lot of .Rproj's in one repository (only one per folder, of course). In trying to packrat-ize our work, this has become a little tricky. While the documented method of putting source("../.Rprofile", chdir = TRUE) generally works, it's rather annoying that RStudio has no idea you're working with a packrat project. The Packages view is then quite misleading, and you don't get access to the nice RStudio integrations.
I've tried and tried to enable Packrat in a sub-directory .Rproj in a way that it uses the already-made packrat folder, but I just can't make it work. No combination of global cache/local repositories/.Renviron-file-setting-R_PACKRAT_CACHE_DIR seem to work the way I'd hope.
Is it possible to have multiple .Rproj files all point to a single packrat folder?
I suppose one project shouldn't be able to muck with the dependencies of another project, whether we're talking sibling or parent-child relationships. I (assume) I could give a child project external package pointers to libraries up above one-by-one, but even automating/wildcarding that might be an improvement over the current options.
I'd love to help if I can, whether through code or just updating the docs so the next person with this problem can find the answer.
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 reviewing the documented source("../.Rprofile", chdir = TRUE) approach and the reported global cache, local repository, and R_PACKRAT_CACHE_DIR options. Determine whether multiple .Rproj files can share one packrat folder; done means either documenting a supported setup or clearly defining the behavior needed if it is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100