[Qgis-user] RE: manageR doesn't work well

burton449 burton.1 at sympatico.ca
Sun May 22 07:22:19 PDT 2011


Hi Carson,

Sorry, my mistake, I use R 2.11.0 because in this version the executable are stored in a subdirectory that rpy2 can read. Newer version of R its not working with rpy2. I will try your trick to change the code in the __init__.py but I dont think it would solve my problem. Actually manageR is loading in QGIS but its not working properly.

Thank you
Maxime

Date: Sun, 22 May 2011 06:11:10 -0700
From: ml-node+6391395-336189830-336498 at n2.nabble.com
To: burton.1 at sympatico.ca
Subject: Re: manageR doesn't work well



	Hi Maxime,


> Im using manageR 1.0, QGIS 1.7 and 1.6 and R 1.11.0 on Windows 7

Are you sure you're using R 1.11.0? That's a pretty old version! Also,

which version of rpy2 are you using? Furthermore, I attach an email

from another manageR using with a possible solution for Windows 7

issues:


I had a problem getting ManageR to run on QGIS 1.60 (OSGeoW4 install)

with R-2.12.1 (32 bit) on Windows 7 64 bit systems. Rpy2 complained

about not finding R.dll.

Newer versions of R place the executable files in a new subdirectory,

i386, below the bin directory on Windows 7 systems.


After searching the net for a while, I finally found the following

post, which seems to fix the problem:

http://www.mail-archive.com/rpy-list@.../msg02779.html
 Try adding these two lines to rinterface/__init__.py

    # Load the R dll using the explicit path

    # First try the bin dir:

    Rlib = os.path.join(R_HOME, 'bin', 'R.dll')

    # Try bin/i386 subdirectory seen in R 2.12.0  ## ADDED ##

    if not os.path.exists(Rlib):                ## ADDED ##

      Rlib = os.path.join(R_HOME, 'bin', 'i386', 'R.dll')  ## ADDED ##

    # Then the lib dir:

    if not os.path.exists(Rlib):

      Rlib = os.path.join(R_HOME, 'lib', 'R.dll')

    # Otherwise fail out!

    if not os.path.exists(Rlib):

      raise RuntimeError("Unable to locate R.dll within %s" % R_HOME)


Hope that helps a bit,


Carson


--

Carson J. Q. Farmer

ISSP Doctoral Fellow

National Centre for Geocomputation

National University of Ireland, Maynooth,

http://www.carsonfarmer.com/
_______________________________________________

Qgis-user mailing list

[hidden email]

http://lists.osgeo.org/mailman/listinfo/qgis-user

	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://osgeo-org.1803224.n2.nabble.com/manageR-doesn-t-work-well-tp5543144p6391395.html
	
	
		
		To unsubscribe from manageR doesn't work well, click here.
	 		 	   		  

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/manageR-doesn-t-work-well-tp5543144p6391522.html
Sent from the qgis-user mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110522/26661048/attachment.html>


More information about the Qgis-user mailing list