[Qgis-user] Problem with SDA4PP/Linked Statistical Display

Volkan Kepoglu vkepoglu at gmail.com
Wed Dec 9 11:42:33 PST 2009


1. tested code:

import rpy2
import rpy2.robjects as robjects
print(rpy2.__version__)
print(robjects.r)
r = robjects.r
r.require("iplots")[0]
r.require("iplots")
r.require("iplots").r_repr()
r.require("ade4")[0]

2. I am testing the code in the ms-dos prompt with python itself, and it is
ok, the result is

C:\temp>python rpy2_iplots.py
2.0.6
<rpy2.robjects.R object at 0x01FD22F0>
platform: i386-pc-mingw32
arch: i386
os: mingw32
system: i386, mingw32
status:
major: 2
minor: 9.0
year: 2009
month: 04
day: 17
svn rev: 48333
language: R
version.string: R version 2.9.0 (2009-04-17)
Loading required package: iplots
Loading required package: rJava
Warning messages:
1: package 'iplots' was built under R version 2.9.1
2: package 'rJava' was built under R version 2.9.1
Loading required package: ade4

Attaching package: 'ade4'


        The following object(s) are masked from package:base :

         within

Warning message:
package 'ade4' was built under R version 2.9.2

C:\temp>

Anne: ade4 package is working very well in my environment.

3. BUT, now tested with pywin32, the pythonwin is crashed.

maybe the problem is related with pywin32, not rpy2.

On Wed, Dec 9, 2009 at 4:37 PM, Agustin Lobo <alobolistas at gmail.com> wrote:

> Sorry I cannot test this further until next weekend.
> So far the only difference with the new version is that
> I get "a formal complaint" on lacking rJava in a popup window instead of
> the list of python errors. But rJava is installed
> and running fine as far as I can tell (which is not a lot as
> I rarely use rJava).
> Thanks for your work.
>
> Agus
>
> Volkan Kepoglu wrote:
>
>> updated with ver. 0.142, could you try that if it is fixed?
>>
>> 1. added loading of rJava package function
>> 2. changed the style of loading of iplot package: first checks the package
>> installed or not
>> and then loads the package but skips to control the package whether it is
>> loaded or not,
>> because, most probably, i think that there is a bug for iplots package.
>> even it is loaded, sometimes do not return true.
>> for this reason, i prefered not to control the library whether loaded or
>> not.
>>
>> On Tue, Dec 8, 2009 at 9:30 PM, Agustin Lobo [via OSGeo.org] <[hidden
>> email] <
>> http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4139061&i=0>>
>> wrote:
>>
>>    Dear Volkan,
>>    Thanks for SDA4PP.
>>    When I try to run the Linked Statistical Display in SDA4PP (0.141)
>>    (R 2.10)
>>    (QGIS 1.3.0 from ubuntu jaunty binaries) I get the following error
>>    despite having the package rJava installed (also: note that rJava is
>>    not listed among the dependencies):
>>
>>    Traceback (most recent call last):
>>       File "/home/alobo/.qgis//python/plugins/SDA4PP/sda4pp.py", line
>>    163, in
>>    doIplotTool
>>         d = iplot.IplotTool(self.iface)
>>       File "/home/alobo/.qgis//python/plugins/SDA4PP/iplot.py", line
>>    64, in __init__
>>         self.readInputFile()
>>       File "/home/alobo/.qgis//python/plugins/SDA4PP/iplot.py", line
>>    357, in
>>    readInputFile
>>         errorChecking = sda4ppLoadRpackage.readLib("iplot")
>>       File
>>    "/home/alobo/.qgis//python/plugins/SDA4PP/sda4ppLoadRpackage.py", line
>>    57, in readLib
>>         result += loadIplot(r)
>>       File
>>    "/home/alobo/.qgis//python/plugins/SDA4PP/sda4ppLoadRpackage.py", line
>>    137, in loadIplot
>>         if (r.require("iplots")[0]):
>>       File
>>    "/usr/local/lib/python2.6/dist-packages/rpy2/robjects/__init__.py",
>>    line
>>    422, in __call__
>>         res = super(RFunction, self).__call__(*new_args, **new_kwargs)
>>    RRuntimeError: Error: package 'rJava' could not be loaded
>>
>>    Thanks,
>>
>>    Agus
>>
>>    _______________________________________________
>>    Qgis-user mailing list
>>    [hidden email]
>>    <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4134711&i=0>
>>
>>    http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>>
>>
>> --
>> Regards,
>> Volkan Osman Kepoglu
>> PhD Candidate
>> GGIT Department in METU,
>> http:/ggit.metu.edu.tr <http://ggit.metu.edu.tr>
>>
>> ------------------------------------------------------------------------
>> View this message in context: Re: [Qgis-user] Problem with SDA4PP/Linked
>> Statistical Display <
>> http://n2.nabble.com/Problem-with-SDA4PP-Linked-Statistical-Display-tp4134711p4139061.html
>> >
>> Sent from the qgis-user mailing list archive <
>> http://n2.nabble.com/qgis-user-f2036571.html> at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Qgis-user mailing list
>>
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>


-- 
Regards,
Volkan Osman Kepoglu
PhD Candidate
GGIT Department in METU,
http:/ggit.metu.edu.tr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20091209/95e17798/attachment.html>


More information about the Qgis-user mailing list