I have two installations of R. Is there a way to explicitly point rpy2 to one of these?
Asked
Active
Viewed 1,000 times
5
-
i have no idea how rpy2 works, but i assume it uses R by console access, and the version it finds is the one in your PATH variable... if so you might have to manipulate that... but that would be a very ugly solution :) – phonixor Oct 31 '14 at 13:26
-
It does use the PATH. I guess that @phonixor is writing all his command lines in a shell/terminal with explicit absolute paths because because of that ugly shell feature that makes it search executable in the PATH ;-) – lgautier Nov 18 '14 at 15:15
-
no, the ugly part is that if your program is not using your systems default R, your program has to modify the PATH before launch, and restore it after :( – phonixor Nov 23 '14 at 19:29
1 Answers
2
I believe @phonixor is right. rpy2 uses the R it finds in the path. If you want to change that, change your path.
PATH=/path/to/r/bin:$PATH

mattexx
- 6,456
- 3
- 36
- 47
-
on windows, you have to set `RPATH` and `RHOME` environment variables, I believe. (working from memory and it's been a while). – Paul H Nov 16 '14 at 03:12