Thank you Moritz, Yes I have also had difficulties with Rpy2 apart from on Linux. Also, Rpy2 is quite onerous in terms of effort required to integrate R scripts into Python. Your solution certainly works, but as you mentioned it makes the R script harder to maintain. PypeR is another alternative and is straightforward to install and is simpler from a user perspective.
I would also be interested in hearing opinions from 'true' developers who have much greater expertise than myself in this area. Kind regards, Steve > On Jan 4, 2016, at 2:31 AM, Moritz Lennert <[email protected]> > wrote: > >> On 04/01/16 10:28, Moritz Lennert wrote: >>> On 03/01/16 23:54, Steven Pawley wrote: >>> Like many R-GRASS users, I have a collection of R scripts that >>> interact with GRASS to perform various workflows. I have debated >>> about converting these to Python using Rpy2, although this package >>> can be a difficult to install on all platforms and depends on >>> specific versions of R and Python. I noticed that Moritz Lennert >>> recently developed a GRASS add on which consists of simply writing >>> out the R commands to a temporary script for R to run. >> >> [...] >>> >>> Does this represent a desirable or even acceptable approach for >>> embedding R scripts into grass add ons, or is Rpy2 the 'official' >>> approach. >> >> I wouldn't consider my approach in any way official, but AFAIK, rpy2 >> does not have any "official" status in GRASS either. In my particular >> case (v.class.mlR) this was a quick and dirty hack for a course I had to >> teach. The difficulty of getting rpy2 installed on the lab machines on >> short notice was one of the motivations not to use it. I also agree that >> dependency on rpy2 can be a nuisance and has caused me some headaches >> with other modules, before. However, the approach I used (and others >> have used before) is a bit unwieldy and makes maintaining such modules a >> bit of a pain. >> >> So, I'm curious to hear the opinions of others... > > See [1] for a related issue. > > Moritz > > [1] https://trac.osgeo.org/grass/ticket/1290 _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
