-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set $R_LIBS_SITE rather than $R_LIBS when installing R packages #2326
set $R_LIBS_SITE rather than $R_LIBS when installing R packages #2326
Conversation
…defined libraries before site installed ones. The order is: R_LIBS, R_LIBS_USER, R_LIBS_SITE. And the R install.packages only ever considers the first entry in the library path unless you explicitly specify a lib= to install to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this change. I would just add an option to go back to the previous behaviour, in case there are unforeseen issues with the change to R_LIBS_SITE
. So that users can easily opt-out. Please check my PR akesandgren#11
@boegel thoughts on that change? I don't really think it is needed, it won't hurt of course but in the long run we shouldn't need it... |
Hmm, not quite sure about this one... In some sense it's a bug fix, but it's also a backwards-incompatible change, sort of. @fizwit Any feedback on this proposed change? You probably have more experience with |
@boegel I have to agree with @akesandgren , setting R_LIBS_SITE for R bundle is better than using R_LIBS. It is not a hack and is the correct way to add to the R search Path. The exact issue you mention happens at our site and creates at least one ticket per week. Using install.packages() without specifying lib=path results in an error. My local site documentation directs users to put the following in there .Rprofile. If this is not a hack then I don't know what is. I will reserve a separate Rant about how RStudio-Server completely ignores R_LIBS fand R_LIBS_SITE for a later time. Using R_LIBS_SITE for R bundles would be my preference.
|
Huh! I went and looked at the documentation,
I don't recall from before that '(not recommended)' being there, but I've been reading various versions of this since the 90s, and I wouldn't have a clue when it got introduced. The main question is whether this PR should be modified in light of that recommendation by the R developers? |
We can't really do that. |
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 5 out of 5 (5 easyconfigs in total) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
(created using
eb --new-pr
)Use R_LIBS_SITE when installing RPackages. This makes R pick up user defined libraries before site installed ones. The order is: R_LIBS, R_LIBS_USER, R_LIBS_SITE. And the R install.packages only ever considers the first entry in the library path unless you explicitly specify a lib= to install to.
Fixes #2200