[R-sig-Geo] Qgis-user Digest, Vol 27, Issue 13

Carson Farmer cfarmer at uvic.ca
Tue May 13 23:07:03 CEST 2008


This is certainly where I would like to see manageR go someday! But 
unfortunately this would entail programming in C, which requires someone 
much more skilled than myself!
For now I simply use it instead of jumping between the two applications...
Your suggestion about displaying sp objects was a topic of discussion 
for the QGIS bridge2R team (of which I am a member), but we ended up 
putting this aside, as we felt that the average QGIS user would rather 
have all the R stuff happen 'behind the scenes' on their input vector 
layers directly, rather than knowingly interacting with R.  I tend to 
agree with this idea for that particular project, but for manageR, 
displaying sp objects would be great! I think in the end this would 
require an ogr/gdal driver for sp objects as Barry Rowlingson has 
previously suggested here, and in the r-sig-geo lists.

I have started to look at some brushing and linking functions using the 
iPlots R package, and should hopefully be able to implement some of 
these things in the future...?

Carson


Agustin Lobo wrote:
> Thanks Carson, just knowing that this is an R console is enough.
> Now, after making a simple plot(), I'm just dreaming: if we could
> display sp objects directly, not only avoiding the intermediate
> shp file but being able of plotting columns of the dataframe
> as statistical graphics  in R...
> and soon being able to interact between the R plot and the
> geographic display (a linked brushing, for example), tools
> like in GeoDa but with a real GIS diaplay...
>
> Great job!
> (I'm forwarding the r-sig-geo list just for them
> to know your developments)
>
> Agus
>
> Carson Farmer wrote:
>> Agustin Lobo wrote:
>>> ok, just installed Rpy 1.0.3
>>> (BTW, should I have uninstalled 1.02? how?)
>>> and manageR loads
>>> on qgis 0.10 on ubuntu hardy.
>>> Carson, could you provide some directions on how to use it
>>> or point me to any file with some directions?
>> The plugin dialog can be treated like the R console itself. So 
>> whatever commands you would type into R, you can do in manageR (just 
>> make sure you use '<-' when assigning variables etc. as manageR 
>> doesn't like you to use '='). I have an updated manageR version 
>> which, in addition to making it easier to load spatial data, also 
>> makes it very easy to save R spatial objects as shapefiles and 
>> automatically load them into QGIS. This will be up on my repository 
>> soon (I will post a notice to this list when it is).
>>
>> As for directions on how to use manageR, I have not really come up 
>> with anything yet, but I will try to post something soon with a basic 
>> how to and some screen shots or something.
>>
>> Hope this is enough to get you started!
>>
>> Carson
>>> Should I have R started or should I start it from within
>>> your plugin?
>>>
>>> Thanks!
>>>
>>> Agus
>>>
>>> Agustin Lobo wrote:
>>>> Hi!
>>>>
>>>> Rpy 1.0.3 is available since today!
>>>> "The primary purpose of
>>>> this release is to provide support for R 2.7.0."
>>>> But no windows yet (not a problem in my case).
>>>> More on:
>>>> http://sourceforge.net/mailarchive/forum.php?thread_name=7C8225C0-9810-401A-857F-1B3D6EE4E5F4%40rochester.edu&forum_name=rpy-lis 
>>>>
>>>>
>>>> I'll let you know how it goes with it.
>>>>
>>>> Agus
>>>>
>>>> Carson Farmer wrote:
>>>>> Agus,
>>>>> Unfortunately, the latest R and  Rpy versions are not compatible 
>>>>> on Hardy, so the main repositories will be no help to you in this 
>>>>> regard.  However, there are two solutions (that I know of):
>>>>> 1) If you are able to, you can regress to an earlier version of R, 
>>>>> such as 2.6.0 or 2.6.2. Rpy works fine for older versions.
>>>>> 2) If you don't mind a little bit of extra work, you can follow 
>>>>> the fix posted by Diwaker Gupta (this is actually for Gutsy, but 
>>>>> it still works...) and a few posts afterwards to get Rpy working 
>>>>> with the latest R.
>>>>>
>>>>> Personally, I use R 2.6.0 and Rpy 1.0.1 (though I think 1.0.2 is 
>>>>> the most recent)
>>>>>
>>>>> Hope this helps,
>>>>>
>>>>> Carson
>>>>> a.k.a. cfarmer on IRC
>>>>>> No idea, I installed rpy for using manageR. How can I test it? 
>>>>>> Agus Sebastien Vial wrote:
>>>>>>> > Hi !
>>>>>>> > > Here it works but with R 2.6.1 (and the RPY build for R 2.6.1)
>>>>>>> > > Does your RPY works with R 2.7 ?
>>>>>>> > > Seb
>>>>>>> > > 2008/5/12 Agustin Lobo <aloboaleu at gmail.com>:
>>>>>>> >
>>>>>>>> >> Hi!
>>>>>>>> >>
>>>>>>>> >> I have a problem with loading plugin manageR.
>>>>>>>> >> I have R 2.7.0, rpy 1.0.2 , python and numpy on ubuntu hardy.
>>>>>>>> >> I get
>>>>>>>> >> the following message at starting qgis 0.10:
>>>>>>>> >>
>>>>>>>> >> Couldn't load plugin "manageR" from 
>>>>>>>> ['/home/alobo/.qgis//python/plugins',
>>>>>>>> >> '/usr/local/share/qgis/python', 
>>>>>>>> '/usr/local/share/qgis/python/plugins',
>>>>>>>> >> '/usr/lib/python25.zip', '/usr/lib/python2.5',
>>>>>>>> >> '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk',
>>>>>>>> >> '/usr/lib/python2.5/lib-dynload', 
>>>>>>>> '/usr/local/lib/python2.5/site-packages',
>>>>>>>> >> '/usr/lib/python2.5/site-packages',
>>>>>>>> >> '/usr/lib/python2.5/site-packages/Numeric',
>>>>>>>> >> '/usr/lib/python2.5/site-packages/PIL',
>>>>>>>> >> '/usr/lib/python2.5/site-packages/gst-0.10',
>>>>>>>> >> '/var/lib/python-support/python2.5',
>>>>>>>> >> '/usr/lib/python2.5/site-packages/gtk-2.0',
>>>>>>>> >> '/var/lib/python-support/python2.5/gtk-2.0']
>>>>>>>> >>
>>>>>>>> >> Traceback (most recent call last):
>>>>>>>> >>  File "", line 2, in
>>>>>>>> >>  File 
>>>>>>>> "/home/alobo/.qgis//python/plugins/manageR/__init__.py", line 
>>>>>>>> 35, in
>>>>>>>> >>  from manageR import manageRPlugin
>>>>>>>> >>  File 
>>>>>>>> "/home/alobo/.qgis//python/plugins/manageR/manageR.py", line 
>>>>>>>> 40, in
>>>>>>>> >>  import domanageR
>>>>>>>> >>  File 
>>>>>>>> "/home/alobo/.qgis//python/plugins/manageR/domanageR.py", line 
>>>>>>>> 39, in
>>>>>>>> >>  from rpy import *
>>>>>>>> >>  File "/usr/lib/python2.5/site-packages/rpy.py", line 134, in
>>>>>>>> >>  """ % RVERSION)
>>>>>>>> >> RuntimeError: /usr/lib/python2.5/site-packages/_rpy2070.so: 
>>>>>>>> undefined
>>>>>>>> >> symbol: KillAllDevices
>>>>>>>> >>
>>>>>>>> >>   RPy module can not be imported. Please check if your rpy
>>>>>>>> >>   installation supports R 2.7.0. If you have multiple R 
>>>>>>>> versions
>>>>>>>> >>   installed, you may need to set RHOME before importing rpy. 
>>>>>>>> For
>>>>>>>> >>   example:
>>>>>>>> >>
>>>>>>>> >>   >>> from rpy_options import set_options
>>>>>>>> >>   >>> set_options(RHOME='c:/progra~1/r/rw2011/')
>>>>>>>> >>   >>> from rpy import *
>>>>>>>> >>
>>>>>>>> >> Is there anything I had to do and did not? Is there anything 
>>>>>>>> to set up
>>>>>>>> >> within R?
>>>>>>>> >>
>>>>>>>> >> Thanks!
>>>>>>>> >>
>>>>>>>> >> Agus
>>>>>>>> >>
>>>>>>>> >> --
>>>>>>>> >> Dr. Agustin Lobo
>>>>>>>> >> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
>>>>>>>> >> LLuis Sole Sabaris s/n
>>>>>>>> >> 08028 Barcelona
>>>>>>>> >> Spain
>>>>>>>> >> Tel. 34 934095410
>>>>>>>> >> Fax. 34 934110012
>>>>>>>> >> email: Agustin.Lobo at ija.csic.es
>>>>>>>> >> http://www.ija.csic.es/gt/obster
>>>>>>>> >> _______________________________________________
>>>>>>>> >> Qgis-user mailing list
>>>>>>>> >> Qgis-user at lists.osgeo.org
>>>>>>>> >> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>>>>> >>
>>>>>>>>       
>>>>>>> > > >     
>>>>>>
>>>>>> -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume 
>>>>>> Almera" (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 
>>>>>> 34 934095410 Fax. 34 934110012 email: Agustin.Lobo at ija.csic.es 
>>>>>> http://www.ija.csic.es/gt/obster
>>>>>
>>>>
>>>
>>
>




More information about the R-sig-Geo mailing list