[R] install.packages and dependencies=TRUE
Gábor Csárdi
csardi.gabor at gmail.com
Tue Dec 17 18:15:05 CET 2013
> On Tue, Dec 17, 2013 at 11:36 AM, Duncan Murdoch
> <murdoch.duncan at gmail.com> wrote:
[...]
>> I imagine some package has a function that does what you want, but I don't
>> know it. It wouldn't be hard to put one together as follows:
>>
>> 1. install your package without its dependencies.
This does not seem to work if the package had 'Depends' or 'Imports'
as well. What is the correct way to install a local package, so that
its dependencies are pulled from CRAN?
>> 2. use tools::package_dependencies() to find the (non-recursive)
>> dependencies.
This does not seem to work, because the dependencies are only checked on CRAN.
>> 3. install those, with their dependencies.
In summary, it is not quite trivial to do this correctly, if you look
at devtools:::install_deps and and devtools:::parse_deps, it is not 10
lines of code.
Anyway, I can just take the code from devtools or use their unreleased version.
Thanks again,
Gabor
[...]
More information about the R-help
mailing list