On Wed, 2008-11-12 at 21:57 +0000, Peter wrote: > On Wed, Nov 12, 2008 at 9:09 PM, laurent <[EMAIL PROTECTED]> wrote: > > > > That's not (yet) stated in the doc, but the code > > for rpy2.riniterface.__init__ tells it: > > > > 1- look for R_HOME > > 2- if not R_HOME, try to get R_HOME from an executable R in > > the $PATH/%Path% > > 3- if still nothing and win32, try to get R from the registry > > > > L. > > That's a slightly different order from rpy1 (which was R_HOME, > registry, PATH).
Hopefully for the better. > Its important that R_HOME is first so the user can > easily over-ride the automatic detection (e.g. if they have more than > one version of R installed). The idea is that both R_HOME and PATH are specified by the understanding user. Using the registry is considered a fallback for the case R_HOME and PATH cannot be used, and this is a win32 machine. Having R_HOME, registry, PATH in that order causes unnecessary differences between UNIX and win32 version (and potential headaches when troubleshooting). > If I can find the time this week I'll try and test this out on my > Windows machine - but no promises. Great if you can. > From memory the registry gives the > base folder, and you have to add the "bin" directory to get the full > path for the DLL. > > Peter > > P.S. I would change this error message from > rpy2/rinterface/__init__.py (lines 24 to 26) > > raise RuntimeError("R_HOME define, and no R command in the PATH.") > > to: > raise RuntimeError("R_HOME undefined, and no R command on the PATH.") > > or more explicitly: > raise RuntimeError("Could not locate R. The R_HOME environment > variable is undefined, and there is R command on the PATH.") Looks helpful. L. > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list