Add note or better handling for dealing with installing packages from source vs. binary in packrat.init
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
When using packrat.init(), I think in most cases there is an expectation that this works automatically, with no user input required once the command has been issued.
For example, I have a project that requires the "sp" package, which in my environment has a newer source version than binary. When installing "sp" with install.packages(), it brings up the prompt:
There is a binary version available but the source version is later:
binary source needs_compilation
sp 1.1-1 1.2-0 TRUE
Do you want to install from sources the package which needs compilation?
y/n:
However, with packrat.init(), most of that prompt is cut off and all I get is y/n: and I have to make a choice for the initialization to proceed. This is bad first of all because the average user won't y/n is referring to, but also because I don't want packrat.init() to be interactive.
After looking here, I realized I could just set
options(install.packages.compile.from.source = TRUE)
which takes care of the problem. This might be worth noting in the docs.
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
Search the documentation for packrat.init and package installation behavior, then read the linked R source reference for the relevant option. Document why the source-versus-binary prompt is incomplete or interactive during initialization and explain the available option and its effect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100