Starting with a fresh Windows XP system I've installed R 2.6.1 and the 
latest Rpy and Python 2.5 from binaries. That all works fine together.

I've also installed Quantum GIS (QGIS) 0.9.1 from released binaries. 
QGIS has an embedded python interpreter which gives access to the 
geographic data and via C++ SIP bindings. Very nice. It also has a 
Python command line console.

I want to use Rpy from QGIS' python to do statistical analysis on 
geographic data. So I start up QGIS, fire up the console, and 'from rpy 
import r'.

  Pretty rapidly R pops up an error dialog from reading the Rconsole 
file. The line number given is a blank line in the file. It then 
proceeds to error on all the blank lines and four non-blank lines:

background = White
normaltext = NavyBlue
usertext = Red
highlight = DarkRed

  If I remove the blank lines and comment out those four, it works fine. 
The error is coming from R's SRC/gnuwin32/preferences.c, so it may be 
something in the opt.c file not reading right.

  Rpy works fine when called from Python run from CMD or cygwin shells, 
or from the ERIC IDE. R runs fine when called from os.spawnv() from 
QGIS' python console.

  I've checked the environment variables in these cases and they're the 
same, so it's not a language setting. I'm stumped.

  Anyone else seen this? Any workarounds? Can I tell Rpy to startup R 
with the '--no-Rconsole' option? Any clues or hints as to what I can do 
to see what's going on are welcome...

  I've had this working before, but probably with slightly different 
versions. It all works fine on Linux.

Barry


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to