Skip to content

issues with R Library on a Server

3 messages · Daisy Englert Duursma, Henrik Bengtsson

#
Hello,

I am a bit over my head on this issue. My colleagues and I are running
R off of our server. We all have admin rights and prior to yesterday
we all had our own libraries. Our main system administrator advised us
that we should have a shared library. So, I am trying to do this.

 I have downloaded the latest version of R and installed it on the
main drive of our server in the  "Program Files" folder (obvious
enough).

I changed the Environmental Variables in the advanced system setting
so R_LIBS  is C:\\RLIBRARY and restarted the server.

The command : .libPaths()[1] results in
[1] "C:\\RLIBRARY"

When I install packages it returns the message :The downloaded packages are in
        C:\Users\Daisy
Englert\AppData\Local\Temp\2\Rtmp9FxLip\downloaded_packages

** This is bad because I though they should go to C:\\RLIBRARY (I think)

Thus the following code does not work:

library(nnet)
Error in get(Info[i, 1], envir = env) :
  internal error -3 in R_decompress1
Error: package/namespace load failed for 'nnet'


My questions are:

Why are the packages downloading to the above location?
What is the next step(s) I should take to setting up the server correctly.



Thanks,
Daisy
#
On Tue, May 18, 2010 at 4:03 AM, Daisy Englert Duursma
<daisy.duursma at gmail.com> wrote:
That is where R *downloads* the package files (for temporary storage),
but it is not where they are installed.  By default, they are
installed in the (first possible, I think) path of .libPaths().

You can see the installation path by, for instance,

packageDescription("base");

and

packageDescription("nnet");
with the 'nnet' package.  Try to install another package and see if
that works.

My $.02

/Henrik
#
Hello,

Thanks for your help so far, I am still having the same problem but I
think I am getting closer. Just to recap, since setting up R on my
server, so that everyone shares a common Library, I have had issues
getting packages to load. Here is an example with the package
survival. I have the survival package in my library but....
Error in library.dynam(lib, package, package.lib) :
  shared library 'survival' not found
Error: package/namespace load failed for 'survival'
# downloaded survival
The downloaded packages are in
        C:\Users\Daisy
Englert\AppData\Local\Temp\2\RtmpObE4EY\downloaded_packages

# load the package again
library(survival)
Error in get(Info[i, 1], envir = env) :
  cannot allocate memory block of size 3.0 Gb
Error: package/namespace load failed for 'survival'


This is were it gets weird. If I restart R and load survival it works
perfectly.  I do not get it.
There is one funny thing though and it has to do with forwards and back slashes.
[1] "C:\\RLIBRARY"

#TWO BACK SLASHES
Title: Survival analysis, including penalised likelihood.
#....................

-- File: C:\RLIBRARY/survival/Meta/package.rds

#ONE BACK SLASH AND THE REST ARE FORWARD SLASHES

In the environmental variable on the server I set R_LIBS to C:\RLIBRARY.
Is that correct?

Any ideas on what the problem may be and why it fixes itself if I restart R?


Thanks,
Daisy