[R-sig-Geo] run R from osgeo4w as a grass-python script
Massimo Di Stefano
massimodisasha at gmail.com
Sat Feb 25 00:57:46 CET 2012
Thanks Alex,
running graas7 it gives me a proper shell .. so executing the R.exe command from it i got spgrass6 running.
now i have to test if it works as aspected (i don't know if spgrass6 is compatible with grass7).
yes, as i can see there is no way to run rpy2 on windows (that's what i got from internet)
.. as hack i'm going to wrote temp file with r instructions inside and run it with R vanilla option in batch mode.
thanks for the hints, i'll dive into the egis list archive to see if someone already solved the problem with rpy2.
see you!!!
Massimo.
Il giorno Feb 24, 2012, alle ore 6:09 PM, Alex Mandel ha scritto:
> On 02/24/2012 10:00 AM, Massimo Di Stefano wrote:
>> Hi All,
>>
>> I'm an linux user and i'm bring to develop a series of python scripts for grass
>> where i'm using rpy2 to call R and require the R packages spgrass6 (rgdal sp and others).
>>
>> On Linux and osx all runs as aspected .. now i need to port the script on windows .. and i'm a bit disoriented.
>>
>> i'd like to use grass and python that comes with the osgeo4w installer.
>> I installed R, but i don't know how to use it from inside a grass session.
>> If I run GRASS he is not able to detect the installed R .. and also the osgeo4w python .. rpy2 is not able to detect the R installation.
>>
>> Do you have any link to a guide or hints on how to have all running in the same environment ?
>>
>> Many many thanks for any help!
>>
>> once i'll figure out the esiest way to do it, i'm thinking to update the grass wiki to add an 'how to' to easy run grass and R tighter trough a python grass script.
>>
>
> Massimo,
>
> Taking a guess, I think you need to edit the .bat file that launches GRASS to ensure that it does so with R in the %PATH%. I believe many people have gotten the QGIS ManageR plugin to work with OSGeo4w so maybe there are additional hints there.
>
> FYI, ryp2 is broken in the recent python 2.7 upgrade of osgeo4w for lack of a windows binary for rpy2 for said version of python.
>
> Thank,
> Alex
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
More information about the R-sig-Geo
mailing list