From maechler at stat.math.ethz.ch  Mon May 31 14:24:18 2004
From: maechler at stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Mon May 31 14:24:22 2004
Subject: [Rd] Several libraries won't load with rw1090pat (PR#6926)
Message-ID: <20040531122418.20C29106A8@slim.kubism.ku.dk>

This is not a bug AFAICS!!

>>>>> "RMH" == Richard M Heiberger <rmh@temple.edu>
>>>>>     on Mon, 31 May 2004 01:28:47 +0200 (CEST) writes:

    RMH> Several libraries won't load with rw1090pat. 

It is **packages**  (really!)    [*.dll files typically are libraries]

    RMH> MASS which is included with the distribution, is one of
    RMH> them.

I think you're using a MASS versions that does NOT come with the dist.,
see below

    ......

    RMH> This listing is from the RGUI

    >> 
    >> R : Copyright 2004, The R Foundation for Statistical Computing
    >> Version 1.9.0 Patched (2004-04-27), ISBN 3-900051-00-3
    >> 
    >> R is free software and comes with ABSOLUTELY NO WARRANTY.
    >> You are welcome to redistribute it under certain conditions.
    >> Type 'license()' or 'licence()' for distribution details.
    >> 
    >> R is a collaborative project with many contributors.
    >> Type 'contributors()' for more information and
    >> 'citation()' on how to cite R in publications.
    >> 
    >> Type 'demo()' for some demos, 'help()' for on-line help, or
    >> 'help.start()' for a HTML browser interface to help.
    >> Type 'q()' to quit R.
    >> 
    >> > library(MASS)
    >> Error in loadNamespace(i[[1]], c(lib.loc, .libPaths()), keep.source) : 
    >> package 'mva' does not have a name space
    >> Error in library(MASS) : package/namespace load failed

The fact that this version of MASS is trying to load 'mva'
is an absolute sure sign that you try to load/attach an old
version of MASS.

Type
	library()
and look for "MASS" to see where R tries to get MASS.

Probably similar problems apply to the other examples.

Or you try to load packages (and their dll's) that were built
with outdated versions of R.
This is often not a problem, but definitely is for packages that
use S4 classes.

    >> > library(mvtnorm)
    >> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
    >> unable to load shared 
    RMH> library "C:/PROGRA~1/R/RW1090~1/library/mvtnorm/libs/mvtnorm.dll":
    >> LoadLibrary failure:  Access is denied.

Access denied might be an indication of yet another "problem":

Are you running another version of R simultaneously?
IIRC, Windoze has the nice feature to sometimes lock files when
it shouldn't.  

I don't know the solution to that problem, but AFAIK it's not at
all related to the version of R.

    >> Error in library(mvtnorm) : package/namespace load failed
    >> > library(multcomp)
    >> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
    >> unable to load shared 
    RMH> library "C:/PROGRA~1/R/RW1090~1/library/mvtnorm/libs/mvtnorm.dll":
    >> LoadLibrary failure:  Access is denied.
    >> Error in library(multcomp) : package/namespace load failed
    >> > library(abind)
    >> > library(Hmisc)
    >> Hmisc library by Frank E Harrell Jr
    >> 
    >> Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview')
    >> to see overall documentation.
    >> 
    >> Hmisc redefines [.factor to drop unused levels of factor variables
    >> when subscripting. To prevent this behaviour, issue the command
    >> options(drop.unused.levels=F).

((if only 'Hmisc' could refrain from this...))

    >> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
    >> unable to load shared library "C:/PROGRA~1/R/RW1090~1/library/Hmisc/libs/Hmisc.dll":
    >> LoadLibrary failure:  Access is denied.
    >> Error in library(Hmisc) : .First.lib failed
    >> > 
    >>


[Rd] Several libraries won't load with rw1090pat (PR#6926)
maechler@stat.math.ethz.ch