[GRASS-user] spgrass6
Hi all. I'm working with spgrass6 R module, and I found that spplot() is horribly slow (several *minutes* for a 5k cell raster). Is this a common, known problem, or a local one? Thanks. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
On Wed, Feb 22, 2012 at 9:17 AM, Paolo Cavallini cavall...@faunalia.it wrote: Hi all. I'm working with spgrass6 R module, and I found that spplot() is horribly slow (several *minutes* for a 5k cell raster). Is this a common, known problem, or a local one? I am afraid that it is a generic R problem. Other example: While GRASS made a PCA in 1-2 min on a set of three radar maps I had to kill R after 20min because I got impatient... Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
Il 22/02/2012 10:38, Markus Neteler ha scritto: I am afraid that it is a generic R problem. Other example: While GRASS made a PCA in 1-2 min on a set of three radar maps I had to kill R after 20min because I got impatient... OK, I see, thanks. Are R devs aware of this? Should we open tickets? All the best. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
On Wed, Feb 22, 2012 at 11:32 AM, Paolo Cavallini cavall...@faunalia.it wrote: OK, I see, thanks. Are R devs aware of this? I guess so but.. Should we open tickets? ... no idea, perhaps grass-st...@lists.osgeo.org would be the right place to discuss this issue. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
As opposed to GRASS, R has not been designed with computational and/or memory efficiency as a priority. It has its limits when dealing with large datasets (not only GIS datasets). Maybe your analysis would allow you to run your computations on a representative sample instead of the whole dataset? Ben On Wed, Feb 22, 2012, at 11:34, Markus Neteler wrote: On Wed, Feb 22, 2012 at 11:32 AM, Paolo Cavallini cavall...@faunalia.it wrote: OK, I see, thanks. Are R devs aware of this? I guess so but.. Should we open tickets? ... no idea, perhaps grass-st...@lists.osgeo.org would be the right place to discuss this issue. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
Il 22/02/2012 12:21, Benjamin Ducke ha scritto: As opposed to GRASS, R has not been designed with computational and/or memory efficiency as a priority. Oh! I was not fully aware of this. Maybe your analysis would allow you to run your computations on a representative sample instead of the whole dataset? In our case, the analysis is vert simple: just ssplot() of a small (2k by 2k cells) raster. Thanks. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] spgrass6
Have you tried a plotting function that is more efficient for gridded R data? Perhaps plot() from the raster package? I think this is rather a question for the R mailing list, though. Ben On Wed, Feb 22, 2012, at 13:02, Paolo Cavallini wrote: Il 22/02/2012 12:21, Benjamin Ducke ha scritto: As opposed to GRASS, R has not been designed with computational and/or memory efficiency as a priority. Oh! I was not fully aware of this. Maybe your analysis would allow you to run your computations on a representative sample instead of the whole dataset? In our case, the analysis is vert simple: just ssplot() of a small (2k by 2k cells) raster. Thanks. -- Paolo Cavallini See: http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Fwd: [GRASS-user] Spgrass6 and R using GRASS Bash Scripts
Greetings Thanks Markus and Milton for your help But... Imagine that I'm running a GRASS Script with Module, and all GRASS functions. How can I integrate it in there? I mean, the user selects a raster and How can i use that input to run a Script that calls R? That is my question. Because I can have a script, like you sent me, but it's not interactive... Or is it easier using Python? On Fri, Apr 16, 2010 at 3:28 PM, Markus Neteler nete...@osgeo.org wrote: On Fri, Apr 16, 2010 at 11:21 AM, Gilbert Ferrara gilbertferrara1...@gmail.com wrote: Good Morning I need to do something similar to what Neteler/Mitasova do in their book with spgrass6 and R. Since I will have to perform this a couple of times I want to build a simple Script with input/output GUI. But I have never seen a GRASS Bash script that calls R and spgrass6. So my question is? Does anyone have/knows one? If not, I just need to send to the command line exacly the same commands? e.g. R , summary(data) ) Yes. Example: GRASS 6.4.0svn (nc_spm_08):~ cat R_batch_nc.R library(spgrass6) mydem - readRAST6(elevation) summary(mydem) To run it inside GRASS, do GRASS 6.4.0svn (nc_spm_08):~ R CMD BATCH R_batch_nc.R The standard output result is stored in R_batch_nc.Rout. Of course you can also generate new GIS data in R and write them back to GRASS with writeRAST6() or writeVECT6(). Hope this helps, Markus PS: Yes, I am also suprised that the GRASS Wiki isn't full of useful scripts calling R in GRASS in batch mode... ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Spgrass6 and R using GRASS Bash Scripts
Greetings Thanks Markus and Milton for your help But... Imagine that I'm running a GRASS Script with Module, and all GRASS functions. How can I integrate it in there? I mean, the user selects a raster and How can i use that input to run a Script that calls R? That is my question. Because I can have a script, like you sent me, but it's not interactive... Or is it easier using Python? On Fri, Apr 16, 2010 at 3:28 PM, Markus Neteler nete...@osgeo.org wrote: On Fri, Apr 16, 2010 at 11:21 AM, Gilbert Ferrara gilbertferrara1...@gmail.com wrote: Good Morning I need to do something similar to what Neteler/Mitasova do in their book with spgrass6 and R. Since I will have to perform this a couple of times I want to build a simple Script with input/output GUI. But I have never seen a GRASS Bash script that calls R and spgrass6. So my question is? Does anyone have/knows one? If not, I just need to send to the command line exacly the same commands? e.g. R , summary(data) ) Yes. Example: GRASS 6.4.0svn (nc_spm_08):~ cat R_batch_nc.R library(spgrass6) mydem - readRAST6(elevation) summary(mydem) To run it inside GRASS, do GRASS 6.4.0svn (nc_spm_08):~ R CMD BATCH R_batch_nc.R The standard output result is stored in R_batch_nc.Rout. Of course you can also generate new GIS data in R and write them back to GRASS with writeRAST6() or writeVECT6(). Hope this helps, Markus PS: Yes, I am also suprised that the GRASS Wiki isn't full of useful scripts calling R in GRASS in batch mode... ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Spgrass6 and R using GRASS Bash Scripts
Good Morning I need to do something similar to what Neteler/Mitasova do in their book with spgrass6 and R. Since I will have to perform this a couple of times I want to build a simple Script with input/output GUI. But I have never seen a GRASS Bash script that calls R and spgrass6. So my question is? Does anyone have/knows one? If not, I just need to send to the command line exacly the same commands? e.g. R , summary(data) ) Thanks Gilbert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Spgrass6 and R using GRASS Bash Scripts
Hi Gilbert, There ist more than one way. I will tell you the way that works for me: 0. Be sure your Rgui.exe are in the windows path like C:\Program Files (x86)\R\R-2.9.0\bin 1. Start grass/MSYS (sorry, I am on windows). 2. Connect to you mapseet 3. inside MSYS shell type: Rgui.exe 4. Inside R you can run your scripts like: #this is on R require(spgrass6) gmeta6() myMap=readRAST6(...) summary(myMap) system(g.list.exe rast) -- But I know that the way I do are not updated :-) cheers milton 2010/4/16 Gilbert Ferrara gilbertferrara1...@gmail.com Good Morning I need to do something similar to what Neteler/Mitasova do in their book with spgrass6 and R. Since I will have to perform this a couple of times I want to build a simple Script with input/output GUI. But I have never seen a GRASS Bash script that calls R and spgrass6. So my question is? Does anyone have/knows one? If not, I just need to send to the command line exacly the same commands? e.g. R , summary(data) ) Thanks Gilbert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Spgrass6 and R using GRASS Bash Scripts
On Fri, Apr 16, 2010 at 11:21 AM, Gilbert Ferrara gilbertferrara1...@gmail.com wrote: Good Morning I need to do something similar to what Neteler/Mitasova do in their book with spgrass6 and R. Since I will have to perform this a couple of times I want to build a simple Script with input/output GUI. But I have never seen a GRASS Bash script that calls R and spgrass6. So my question is? Does anyone have/knows one? If not, I just need to send to the command line exacly the same commands? e.g. R , summary(data) ) Yes. Example: GRASS 6.4.0svn (nc_spm_08):~ cat R_batch_nc.R library(spgrass6) mydem - readRAST6(elevation) summary(mydem) To run it inside GRASS, do GRASS 6.4.0svn (nc_spm_08):~ R CMD BATCH R_batch_nc.R The standard output result is stored in R_batch_nc.Rout. Of course you can also generate new GIS data in R and write them back to GRASS with writeRAST6() or writeVECT6(). Hope this helps, Markus PS: Yes, I am also suprised that the GRASS Wiki isn't full of useful scripts calling R in GRASS in batch mode... ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user