Problem with version 1.5.5

Sep 16, 2013 at 10:03 PM
Edited Sep 16, 2013 at 10:36 PM
Hello,

I updated from version 1.5.0 to 1.5.5.
After upgrading I can no longer load R libraries installed in the user's library directory.
Before the update, executing the R function .libPaths() would output;
    C:/Users/robmac/Documents/R/win-library/2.15
    C:/Program Files/R/R-2.15.1/library
After updaing to version 1.5.5, .libPaths() only reports one library path
    C:/Program Files/R/R-2.15.1/library
No other code has changed. I downgraded back to version 1.5.0 and the bug went away.
Is there something new that requires a change to the application?

I am running R version 2.15.1 (i386) on Windows 7. There are no Environment variable set to override library paths.
I tried installing other versions of R.NET. This issue seems to have started with version 1.5.2.

Thanks,
Rob
Developer
Sep 17, 2013 at 1:45 AM
Hi,

Thanks for reporting this.
Are you noticing a changed behavior running purely from R, or running R expressions via R.NET? I assume the latter but better ask.

I am not following the recent releases, having being tied to other (lesser...) technologies at work, and cannot intuit what may be going on. .libPaths and underlying stuff should really be pure R behavior so far as I know, so the behavior is intriguing. Even using the R_LIB environment variable should only prepend additional library locations, not override others (see below as I use it to have a version independent library). That said I do not know for sure how it interplays with user's libraries as created by R for non-admin users.

I'll may be able to look at this within a few days if you do not get other help meanwhile.
> .libPaths()
[1] "f:/Rlib"                            "C:/Program Files/R/R-3.0.1/library"
Sep 17, 2013 at 2:08 AM

Hi Jperraud,

Only happens running with R.NET. If I start the R gui, the lib paths are good.

After initializing the R engine I issue 3 R commands (one at a time).

  1. getwd() [report results in log file]
  2. .libPaths() [report results in log file]
  3. library(padb) [This loads my custom R package which is installed in user library]

Under R.NET 1.5.0, all 3 commands are successful.

Under R.NET 1.5.5 #2 only reports one directory and #3 fails with Error in library(padb) : there is no package called 'padb'

I am in no hurry to upgrade R.NET. Let me know if you need example code.

Thanks,

Rob

From: jperraud [email removed]
Sent: Monday, September 16, 2013 5:45 PM
To: MCALLISTER,ROB (A-Spokane,ex1)
Subject: Re: Problem with version 1.5.5 [rdotnet:457115]

From: jperraud

Hi,

Thanks for reporting this.
Are you noticing a changed behavior running purely from R, or running R expressions via R.NET? I assume the latter but better ask.

I am not following the recent releases, having being tied to other (lesser...) technologies at work, and cannot intuit what may be going on. .libPaths and underlying stuff should really be pure R behavior so far as I know, so the behavior is intriguing. Even using the R_LIB environment variable should only prepend additional library locations, not override others (see below as I use it to have a version independent library). That said I do not know for sure how it interplays with user's libraries as created by R for non-admin users.

I'll may be able to look at this within a few days if you do not get other help meanwhile.

> .libPaths()
[1] "f:/Rlib"                            "C:/Program Files/R/R-3.0.1/library"
Developer
Sep 26, 2013 at 1:13 PM
Hi Rob,

I just reran a test program, using a test user credential with no particular priviledges, with R.NET 1.5.5 binaries as on the codeplex web site. I get the behavior expected (see below). The only difference I can think of is that you were on a version 2.15.1 of R, where I have 3.0.1 to test. I cannot recall anything mentioned in the R release notes that would explain a change of behavior. Even less why you get the behavior only with R.NET 1.5.5
            var libPaths = engine.Evaluate(".libPaths()").AsCharacter();
            foreach (var item in libPaths.ToArray())
                Console.WriteLine(item);
C:/Users/joe/Documents/R/win-library/3.0
C:/Program Files/R/R-3.0.1/library
I can only propose you try to upgrade to 3.0.1 if you can afford to. Also as a workaround, and before trying to upgrade, it is worth trying to set the library paths to what they are supposed to be via Engine.Evaluate statements:
lib_paths <- .libPaths()
.libPaths(c('C:/Users/joe/Documents/R/win-library/3.0', lib_paths))
I actually was reminded of the possibility to change the paths dynamically by the devtools package: https://github.com/hadley/devtools/blob/master/R/dev-mode.r

Hope this helps.