From simon.urbanek at r-project.org  Thu Mar 17 17:09:53 2011
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Thu, 17 Mar 2011 12:09:53 -0400
Subject: [Rd] New feature for download.packages(): optional resolution
	of package dependencies
In-Reply-To: <4D821A31.30500@itwm.fraunhofer.de>
References: <4D821A31.30500@itwm.fraunhofer.de>
Message-ID: <C4AB7D9F-BF0A-468A-963F-59CFF36AF1CD@r-project.org>


On Mar 17, 2011, at 10:26 AM, Dr. Peter Ruckdeschel wrote:

> Hi r-devels,
> 
> may I ask for an enhancement for download.packages()
> to optionally resolve package dependencies similarly to
> the respective functionality in install.packages() ?
> 
> This would be a major help in compiling a large number of
> packages (e.g. by means of download.view() from pkg ctv)
> for later offline installations.
> 
> Last November, I addressed Duncan Murdoch offline in this
> issue, and Duncan then seconded me---so the idea might not
> be this silly. He was pointing me to available.packages() which
> already provides a dependency list, which though would have
> to be parsed.
> 

But you don't have to do it yourself - the code is already there, try

utils:::getDependencies("foo",,available.packages())

That said, just adding something along the lines of

if (!missing(dependencies)) pkg <- getDependencies(pkg, dependencies, available)

might be simple enough and do the trick ...

Cheers,
Simon


> AFAICS in the svn, as of rev54842, he has not found the time
> for looking deeper into this so far. Surely, like most of
> you, he has had more urgent issues to work on,  but maybe
> someone (else) of you has an idea for an easy but still
> sustainable solution.
> 
> Any suggestions appreciated.
> 
> Cheers,
> Peter
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



[Rd] New feature for download.packages(): optional resolution of package dependencies
Simon Urbanek