6

I have two installations of R. Is there a way to explicitly point rpy2 to one of these?

3
  • 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 :) Commented Oct 31, 2014 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 ;-) Commented Nov 18, 2014 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 :( Commented Nov 23, 2014 at 19:29

1 Answer 1

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 
Sign up to request clarification or add additional context in comments.

1 Comment

on windows, you have to set RPATH and RHOME environment variables, I believe. (working from memory and it's been a while).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.