From edd at debian.org  Mon May 18 21:55:13 2009
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 18 May 2009 14:55:13 -0500
Subject: [Rd] Auto-upgrading a package under Windows ?
Message-ID: <18961.48417.945981.635658@ron.nulle.part>


I was trying to be cute with a company-internal package and used

    if (Sys.info()["sysname"]=="Windows") {
        update.packages(repos="http://some.where.internal/R", ask=FALSE)
    }

but that of course fails as the package itself is loaded and cannot be
upgraded (as it contains a dll) when loaded.  Smart move by the OS.

Can anybody suggest a workaround, other than introducing a dll-free wrapper
package that can in fact test for the local packages before it would load
them? 

Placing the test into Rprofile.site is not a valid answer as that file is
hiding on each user's drive and out of my reach.

Dirk

-- 
Three out of two people have difficulties with fractions.



[Rd] Auto-upgrading a package under Windows ?
Dirk Eddelbuettel