[R] Package specific dependencies...

Neil Shephard nshephard at gmail.com
Fri Nov 23 12:46:43 CET 2007


On Nov 22, 2007 4:14 PM, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> The SystemRequirements field on the DESCRIPTION file is used
> to document the system requirements.  For example, the DESCRIPTION
> file for Ryacas (which requires yacas) is shown below.
>
> Package: Ryacas
> Version: 0.2-8
> Date: 2007-08-22
> Title: R interface to the yacas computer algebra system
> Author: Rob Goedman <goedman at mac.com>, Gabor Grothendieck
> <ggrothendieck at gmail.com>, Søren Højsgaard
> <Soren.Hojsgaard at agrsci.dk>, Ayal Pinkus <apinkus at xs4all.nl>
> Maintainer: G Grothendieck <ggrothendieck at gmail.com>
> Encoding: latin1
> Description: An interface to the yacas computer algebra system.
> Depends: R (>= 2.5.1), XML
> SystemRequirements: yacas (>= 1.0.63) # instructions on home page
> License: GPL
> URL: http://ryacas.googlecode.com

Thats very useful to know and something that I wasn't aware of.

But (in my mind) there is a subtle difference between installing
packages that require specific libraries and those that require a
specific piece of software.

Taking the Ryacas package as an example, anyone installing that would
automatically know that its required, and in all likelihood would
probably have it installed on their system already and have been using
it but then decided they want to interface with it from R.  This isn't
necessarily the case with libraries, you wouldn't know that a
dependency is required until you come to try and install the package
and get error messages that something is missing.

There is also the rather striking difference (taking the two packages
that have been discussed) in that Ryacas will install on a system that
doesn't have the SystemRequirement met (i.e. without yacas installed)
whereas GDD won't install unless the system has the SystemRequirement
(libgd) is installed, and it is this problem that I am trying to help
address.

I do realise that in either instance a user could find this out in
advance of installing any package by simply reading the DESCRIPTION
file.

 I suspect that the ultimate answer to the question that I'm asking
(i.e. how can dependencies for CRAN packages be pulled in
*automatically* when installing them) will simply be that its down to
the user/sysadmin to sort this out.

Neil
-- 
"Don't remember what you can infer." - Harry Tennant

Email - nshephard at gmail.com / n.shephard at sheffield.ac.uk
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/



More information about the R-help mailing list