From ripley at stats.ox.ac.uk  Tue Oct  4 14:48:01 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 4 Oct 2005 13:48:01 +0100 (BST)
Subject: [Rd] more problems when using "installWithVers"
In-Reply-To: <1abe3fa90510040450s124226a5oae8361f723002e8d@mail.gmail.com>
References: <1abe3fa90510040450s124226a5oae8361f723002e8d@mail.gmail.com>
Message-ID: <Pine.LNX.4.61.0510041334350.3776@gannet.stats>

Tony,

The problem is specific to your example:

> install.packages("ash")
...
> install.packages("ash", installWithVers=TRUE)
> library("ash", version="1.0-9")
> search()
  [1] ".GlobalEnv"        "package:ash_1.0-9" "package:methods"
  [4] "package:stats"     "package:graphics"  "package:grDevices"
  [7] "package:utils"     "package:datasets"  "Autoloads"
[10] "package:base"

and lies in lattice's .onLoad (as the message says, and hence the Cc: to 
Deepayan).  That has

.onLoad <- function(lib, pkg)
{
     library.dynam(pkg, pkg, lib )
     lattice.options(.defaultLatticeOptions())
     lattice.setStatus(.defaultLatticeStatus())
}

which is incorrect: it should be library.dynam("lattice", pkg, lib)
OTOH, 'ash' has it correctly and so works.

I am not sure BTW that lattice_0.12-7 is necessarily compatible with R 
2.2.0.

Brian

On Tue, 4 Oct 2005, A.J. Rossini wrote:

> R-devel, SVN revision 35729 (this morning, euro-time)
>
> So far, I'm having awful luck with the "installWithVers" flags.
>
> Recent example:
>
> I can install.packages("lattice", installWithVers=TRUE)
> successfully (no errors, at least it looks like a successful install),
> but can't load it:
>
> Error in library.dynam(pkg,pkg,lib) : shared library 'lattice_0.12-7' not found
> Error: .onLoad failed in 'loadNamesspace' for 'lattice_0.12-7'
> Error: package/namespace load filed for 'lattice'

Did you really get those typos?  I don't.

Error in library.dynam(pkg, pkg, lib) : shared library 'lattice_0.12-7' not found
Error: .onLoad failed in 'loadNamespace' for 'lattice_0.12-7'
Error: package/namespace load failed for 'lattice'


> It's there.  (note: no problems on a different installation, avoiding
> the "installWithVers" flags for package installation).
>
> best,
> -tony
>
> blindglobe at gmail.com
> Muttenz, Switzerland.
> "Commit early,commit often, and commit in a repository from which we can easily
> roll-back your mistakes" (AJR, 4Jan05).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] more problems when using "installWithVers"
Prof Brian Ripley