Re: [Rd] Outdated dependencies and install.packages()

From: Prof Brian Ripley <>
Date: Wed, 20 Aug 2008 15:46:08 +0100 (BST)

On Wed, 20 Aug 2008, Peter Dalgaard wrote:

> This looks like a buglet:
>> install.packages("lme4", depend=TRUE, lib="~/Rlibrary/")
> --- Please select a CRAN mirror for use in this session ---
> [...snip...]
> ** preparing package for lazy loading
> Error: package 'Matrix' 0.999375-4 was found, but >= 0.999375.11 is
> required by 'lme4'
> Execution halted
> ERROR: lazy loading failed for package 'lme4'
> ** Removing '/home/bs/pd/Rlibrary/lme4'
> ** Restoring previous '/home/bs/pd/Rlibrary/lme4'
> and the DESCRIPTION file for lme 4 does have
> Depends: methods, R( 2.7.0), Matrix( 0.999375-11), lattice
> <>
> Looks like we're either not checking the version requirement of
> dependencies, or something is making 4 > 11... (from my reading of the
> code, it is the former, but I could have missed something).

We don't check version requirements of dependencies in install.packages(). That's a minefield related to having multiple versions of a package on a system and which gets loaded/namespace loaded, so you can easily have the needed version but pick up a different one.

Depending on whether lazy-loading is in place (and various other issues) you may or may not need the dependencies to install the package. It's also a problem that you can update dependencies to incompatible ones, so the versions available at installation are only part of the story.

I don't see why the message reports .11 not -11, but that may be related to "package_version" classes.

> We should at least document the behaviour.

I am not sure where you think it should be documented and is not. But for install.packages():

dependencies: logical indicating to also install uninstalled packages

           on which these packages depend/suggest/import (and so on
           recursively).  Not used if 'repos = NULL'. Can also be a
           character vector, a subset of 'c("Depends", "Imports",

'uninstalled' seems pretty clear to me.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list

Received on Wed 20 Aug 2008 - 14:49:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 20 Aug 2008 - 16:36:56 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive