From ripley at stats.ox.ac.uk  Mon May 10 16:42:27 2010
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 10 May 2010 15:42:27 +0100 (BST)
Subject: [Rd] update.packages fails with directory not found
In-Reply-To: <4BE80B27.60507@gmail.com>
References: <t81fu5t8gg8crt5nm3h3d3rg6bcg7lri7k@4ax.com>
	<4BE7E112.2030005@gmail.com>
	<8kufu51cu368dujtpdqgu5ckfliel4qa85@4ax.com>
	<4BE80B27.60507@gmail.com>
Message-ID: <alpine.LFD.2.00.1005101537180.15991@gannet.stats.ox.ac.uk>

On Mon, 10 May 2010, Duncan Murdoch wrote:

> On 10/05/2010 8:28 AM, Mike Prager wrote:
>> On Mon, 10 May 2010 06:33:54 -0400, Duncan Murdoch
>> <murdoch.duncan at gmail.com> wrote:
>> 
>> >Mike Prager wrote:
>> >> Windows XP.  I have just updated to R 2.11.0 and then run
>> >> update.packages. In the series of updates, a few will succeed, then I
>> >> get a failure like
>> >>
>> >>
>> >> package 'mvtnorm' successfully unpacked and MD5 sums checked
>> >> package 'party' successfully unpacked and MD5 sums checked
>> >> package 'PBSmodelling' successfully unpacked and MD5 sums checked
>> >> Error in normalizePath(path) : >>   path[1]="c:\Program 
>> Files\R\Library/PBSmodelling": The system cannot
>> >> find the file specified
>> >>   >
>> >Is that a cut and paste of the error message?  Normally R would double 
>> >the backslashes when displaying a string, so it looks as though you've 
>> >somehow got a path containing the control characters \P, \R, and \L.  >Did 
>> you set the lib.loc argument when you called update.packages?
>> 
>> Thank you!  Yes, it's cut and paste.

The message coming from C (do_normalizepath) not R.

> I did not set lib.loc in the
>> call (made through the Rgui.exe menu system), but I have the library
>> location defined in the environment:
>> 
>> R_LIBS=c:/Program Files/R/Library
>> 
>> I've been using this approach for several years, and it's worked
>> without problem until now.
>> 
> I can't seem to reproduce this.  If it happens reproducibly on your system, 
> could you please do the following:
> print the result of installed.packages()["PBSmodelling",], .libPaths() and 
> sessionInfo()?
>
> A possible workaround is to get the names of all of your packages in the 
> Library folder and install them, rather than using the update.packages() 
> function.  This may fail if some of them aren't on CRAN or the other 
> repositories.

I think he has a permissions issue on that directory. I'd remove it 
manually after a reboot, then re-install.  (Reboot because it may be 
open in some crashed process.)

I've seen this in Vista/7 several times, but of course permissions are 
more of a hindrance there.


-- 
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] update.packages fails with directory not found
Prof Brian Ripley