Thanks Gabor, but expanding on my remark...

> I can work around by mapping a drive letter to the '//server/share', but
> prefer not to (for local reasons).

R is installed on our network, used by others (with readonly access), 
maintained by me.
In 'Renviron.site' I have...
   R_LIBS_SITE=//Server02/stats/R/library/%v
...which works for everyone else (and for me as long as I don't try 
update.packages).

I (but not everyone else!) routinely have a drive (L:) mapped to 
//Server02/stats so that I can (and currently do) update.packages by
a) altering 'Renviron.site' to R_LIBS_SITE=L://R/library/%v
b) starting Rgui.exe from (e.g.)  L:\R\R-2.10.1\bin
BUT while 'Renviron.site' is altered, users who don't have the drive mapping 
don't get the site library, so I have to be quick and risk a couple of 
complaints.

I've tried putting a '.Renviron' file in my personal home directory 
containing R_LIBS_SITE=L://R/library/%v hoping I could implement a 
'personal' site library, but it doesn't seem to have any effect (not 
unreasonably?). As I outlined, my attempts to alter .libPaths() or 
.Library.site within my R session haven't worked.

Anyway, (although I say this with trepidation) this does look to me like a 
minor bug. It seems to me that (for example)...
> shell.exec(.libPaths()[1])
  and
> shell.exec(file.path(dirname(.libPaths()[1]), basename(.libPaths()[1])))
...should give the same result, especially when (as in this case) the syntax 
of the file spec...
> .libPaths()[1]
[1] "//Server02/stats/R/library/2.10"
... is controlled by R (in this example the former fails with "...not 
found", the latter opens the folder in Windows Explorer).

Best regards,

Keith Jewell
---------------------------------------------
"Gabor Grothendieck" <ggrothendi...@gmail.com> wrote in message 
news:971536df1001260714i430b9ddcm37ffa12642321...@mail.gmail.com...

Try mapping a drive letter to \\Server02 and then use that.  For more,
google for: map network drive

On Tue, Jan 26, 2010 at 10:01 AM, Keith Jewell <k.jew...@campden.co.uk> 
wrote:
> Hi,
>
>> update.packages(ask='graphics')
>
> gives me multiple warning (one per updated package?) similar to ...
>
> Warning: unable to move temporary installation
> '\\Server02\stats\R\library\2.10\file3de56e0d\locfit' to
> '\\Server02\stats\R\library\2.10\locfit'
>
> The final, updated, folders do not end up where they should be. I can move
> them 'by hand', but it is an inconvenience.
>
> Checking the archives I find
> http://finzi.psych.upenn.edu/Rhelp08/2008-April/160963.html where Prof
> Ripley opines "The issue appears to be that your OS is garbling file 
> names",
> and it surely does seem to be a filename problem - in combination R and
> Windows don't seem to be handling the '//server/share' path construction. 
> I
> have:
>> .libPaths()
> [1] "//Server02/stats/R/library/2.10"
> "//Server02/stats/R/R-Current/library"
>
> I can work around by mapping a drive letter to the '//server/share', but
> prefer not to (for local reasons).
>
> In CHANGES.R-2.10.1pat I find
> CHANGES IN R VERSION 2.7.2 patched
> o dir.create(recursive = TRUE) was not working on //server/share paths.
>
> In CHANGES.R-2.11.0dev I find
> CHANGES IN R VERSION 2.11.0
> NEW FEATURES
> o file.rename() can work across volumes (by copy-and-delete)
>
> In another R function I've hit a similar problem and solved it using the
> construction:
> file.path(dirname(x), basename(x))
> to convert '//server/share' to (printed as) '\\\\server/share' which 
> worked
> in that function. In this case:
>> file.path(dirname(.libPaths()), basename(.libPaths()))
> [1] "\\\\Server02/stats/R/library/2.10"
> "\\\\Server02/stats/R/R-Current/library"
> which looks OK but
>> .libPaths(file.path(dirname(.libPaths()), basename(.libPaths())))
>> .libPaths()
> [1] "//Server02/stats/R/library/2.10"
> "//Server02/stats/R/R-Current/library"
> doesn't actually change the internal paths.
>
> I don't see the problem in V2.9.2 .
> I do see the problem in
> V2.10.1,
> V2.10.1 Patched (2010-01-24 r51030)
> V2.11.0 Under development (unstable) (2010-01-24 r51030)
>
> Grateful for any suggestions,
>
> Keith Jewell
> -----------------------------------------------------
> Version:
> platform = i386-pc-mingw32
> arch = i386
> os = mingw32
> system = i386, mingw32
> status = Patched
> major = 2
> minor = 10.1
> year = 2010
> month = 01
> day = 24
> svn rev = 51030
> language = R
> version.string = R version 2.10.1 Patched (2010-01-24 r51030)
>
> Windows Server 2003 x64 (build 3790) Service Pack 2
>
> Locale:
> LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
> Kingdom.1252;LC_MONETARY=English_United
> Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
>
> Search Path:
> .GlobalEnv, package:stats, package:graphics, package:grDevices,
> package:utils, package:datasets, package:methods, Autoloads, package:base
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to