-
Notifications
You must be signed in to change notification settings - Fork 53
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
Renviron and littler #64
Comments
Can you expand on what does work for you for If you mean that it doesn't follow As for |
You could lean on R's And there is always edd@rob:~$ grep Sys.setenv ~/.Rprofile
Sys.setenv(TZ="America/Chicago")
edd@rob:~$ r -p -e 'Sys.getenv("TZ")'
[1] "America/Chicago"
edd@rob:~$ |
Yep, it was initially the I think the easiest change for any future users is to use readRenviron("~/.Renviron") in the Otherwise, close this issue. Ta. |
Fair point on the documenting. I would rather not stress I source my APIs explicitly by looping over snippets in if (dir.exists("~/.R/profile.d")) {
files <- list.files("~/.R/profile.d", pattern=".*\\.R$", full.names=TRUE)
for (f in files) {
source(f)
}
} and because the quoted code lives in |
FYI, some env vars must be set no later than .Renviron. They will have no effect is if set in .Rprofile. |
Right. The POSIX level call to set environment variables rarely affect the already running process. |
If not |
I don't follow. What is your problem? What are you trying to do? What is failing? edd@rob:~$ r -p -e '.libPaths()'
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library"
edd@rob:~$ R_LIBS_USER="/tmp" r -p -e '.libPaths()'
[1] "/tmp" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
edd@rob:~$ There are also dedicated dot.rc files for littler (from way back when we didn't read the R-parseable ones). We simply don't parse |
@eddelbuettel—I misunderstood. I thought you meant that Regarding what I am attempting to do and what is failing, I am trying to automatically add I now keep export R_LIBS_USER="~/.local/lib/%a-%o/R/%v" in one of my shell startup files, and the output of |
Please |
It appears that littler doesn't read .Renviron files
.
I would offer a PR, but my C is probably not good enough for https://github.com/eddelbuettel/littler/blob/master/src/littler.c
Two asides:
readRenviron("~/.Renviron")
to~/.littler.r
install2.r
doesn't follow thelib
convention withinstall.packages()
- a different default location. But it's probably far to late to consider changing that.The text was updated successfully, but these errors were encountered: