Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] to R or not to R

Hi Andrea,

In terms of your original question, R integration with uDig is huge,
particularly for those who want to use uDig as a research tool.

In terms of actually doing it, Adrian and the CGIAR have worked the most
with this. I know Adrian's goal has been to use R's JRI package, while
the CGIAR team use R's RServe package. RServe seems to be clunky, while
the use of JRI also has complications (under Linux you can't use a
binary package of R, instead you have to compile from source to give JRI
the hooks it needs into R).

Looking over the StatET site, it appears that it uses neither of these
two approaches. Instead, it uses connector code that is OS specific.
Under Windows it uses Microsoft .NET-Runtime, while under Unix-like OSs
the connector is a Perl script that starts an instance of R, which, in
turn, listens on a pipe that Eclipse sends code to. Not pretty, but
possible. What comes back to Eclipse in StatET is text output. I'm not
sure what will happen if you try to send an sp class object back to uDig
from R this way. What might work better is to convert the sp class
object to a shapefile (via the R maptools package) or other appropriate
file type (likely using the Rgdal package), and then have uDig read that
file in for display purposes.

To up the competitive juices, there seems to be progress in creating a
connector between QGIS and R using QGIS's new Python scripting ability
and the Rpy package.

Dan

On Thu, 2007-11-10 at 18:42 +0200, Andrea Antonello wrote:
> > > Super interesting stuff.  Have you actually tried either of
> > > these? How Statet integrates their R.  Do they have some JNI or
> > > something?   
> > 
> > I'm not sure, on a first very quick review I couldn't understand it,
> > I hoped that someone on the list had tried it :)
> > The python interface looks very nice. I'm just not sure if it will
> > work in jython, because I never gave a look at that. Will it wrap the
> > installed pyhton and there fore have all the packages? Is it a
> > straight implementation? I will have to give it a look :)
> 
> Alright, I gave it a quick look and it seams that jython is not the way
> to get to R. Jython is a 100% java implementation of python and
> not wrapped on top of it. I would like to cry... i thought I found an
> easy way :)
> 
> The search goes on... an on...
> Andrea
> 
> 
> > 
> > > Can you make use of their console somehow?  how does it compare to  
> > > what you have?  Just curious.
> > 
> > No, I don't thinks so. Our goal is that to mix up some languages in
> > order to interact "spatially" with each other. So for example I could
> > create some raster maps throught grass or jgrass algorithms and then
> > on the generated maps I would want to do some R analysis. Or inverse
> > for example do a Kriging through R (ex. from a point layer in a
> > database), which then writes a GRASS raster, and then access it with
> > grass/jgrass commands. This forces us to stay inside our editor and
> > console, in order to be able to follow the whole workflow.
> > 
> > Andrea
> > 
> > > 
> > > Jesse
> > > 
> > > On Oct 11, 2007, at 8:46 AM, Andrea Antonello wrote:
> > > 
> > > > Hi all, (and mostly Adrian, because we talked a bit about that in
> > > > the past):
> > > >
> > > > How is the actual interest about R and Udig?
> > > >
> > > > I have a couple of collected thoughts about how R should fit into
> > > > udig and connect direktly to maps and would like to know what you
> > > > guys think.
> > > >
> > > > Python has a rpy package that fully supports r and also traps its
> > > > errors. So that seems to be a great way to go through jython.
> > > > You think
> > > > that we could access to all this if we implement Jython support in
> > > > the new JGrass console?
> > > >
> > > > Different way: the statet
> > > > plugin? http://www.walware.de/it/statet/index.html
> > > >
> > > > Just thought,
> > > > would be glad to hear comments.
> > > >
> > > > Ciao
> > > > Andrea
> > > > _______________________________________________
> > > > User-friendly Desktop Internet GIS (uDig)
> > > > http://udig.refractions.net
> > > > http://lists.refractions.net/mailman/listinfo/udig-devel
> > > 
> > > _______________________________________________
> > > User-friendly Desktop Internet GIS (uDig)
> > > http://udig.refractions.net
> > > http://lists.refractions.net/mailman/listinfo/udig-devel
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-- 
Dan Putler
Sauder School of Business
University of British Columbia


Back to the top