<div dir="ltr">Matteo<div><br></div><div style>Thanks for your ideas</div><div style><br></div><div style>you can tell SEXTANTE to use the raster package by using</div><div style><br></div><div style>##myraster=raster|R.Raster</div>
<div style><br></div><div style>instead of </div><div style><br></div><div style>##myraster=raster<br></div><div style><br></div><div style>This is already documented, but only in the github version of the documentation, as it is something that is implemented only in the development versino of SEXTANTE.</div>
<div style><br></div><div style>Anyway, your proposal seems interesting. I tried to save all the possible effort from users developing R algorithms in SEXTANTE, but it's true that you will have more flexibility by just getting the filename.</div>
<div style><br></div><div style>Honestly, I am not an R expert, so I will implement whatever you the R users think is best. My goal is to make it easier for anyonen with a good knowledge of R to adapt their algorithms to SEXTANTE and be able to call them from QGIS. I am opne to all kind off suggestions, since, as I said, I am not an R user and my knowledge of R is very limited.</div>
<div style><br></div><div style>Let's discuss this here in the list.. Hopefully other people using R and SEXTANTE will give their opinion and we can decide what to do</div><div style><br></div><div style>Many thanks again for your help</div>
<div style><br></div><div style>Victor</div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/2/22 Matteo Mattiuzzi <span dir="ltr"><<a href="mailto:matteo@mattiuzzi.com" target="_blank">matteo@mattiuzzi.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear list,<div><br></div><div>I have now tested the possibilities to integrate R Processing in Q-GIS. I think it closes the huge gap in R of interactive visualization and also gives the possibility to use R-functionality to non-R people!</div>

<div><br></div><div>I saw that a raster/vector file is loaded through rgdal and there is no possibility to do it in the own way, such as the almost standard 'raster' package that handles also out of RAM data!</div>

<div>In order to maintain the flexibility of R I think that arguments should be passed as they are (path+file) and everybody would be free to benefit from the entire R repository of functions.</div><div>Thanks Matteo</div>

<div><br></div><div>here an example for extracting and plotting pixels based on vector, point or polygon shp file:</div><div><br></div><div><div>##[MyScr]=group</div><div>##vector=vector</div><div>
##raster=raster</div><div>library(raster)</div><div><br></div><div>s <- shapefile(vector) % high level function from raster package, the argument should be only the file path+ name</div><div>r <- brick(raster) % high level function from raster package, the argument should be only the file path+ name</div>

<div><br></div><div>v <- extract(r,s)</div><div>##showplots</div><div>for(u in seq_along(v))</div><div>{</div><div>    val <- v[[u]]</div><div>    if(u>1) X11()</div><div>    </div><div>    plot(x=1:ncol(val),ylim=c(min(val),max(val)),type="n",main=paste("Extraction line",u),xlab="Band",ylab="Spectral")</div>

<div><br></div><div>    for(i in 1:nrow(val))</div><div>    {</div><div>       lines(val[i,],col=i)</div><div>    }</div><div>}</div><div><br></div><div>############################</div></div><div>LINUX Ubuntu 12.10</div>

<div><span style="border-spacing:0px;border-collapse:separate;font-size:medium;font-family:Times"><table width="100%"><tbody><tr><td>QGIS version</td><td>1.9.0-Master</td><td>QGIS code revision</td>
<td>2a2465e</td></tr><tr><td>Compiled against Qt</td><td>4.8.1</td><td>Running against Qt</td><td>4.8.1</td></tr><tr><td>Compiled against GDAL/OGR</td><td>1.9.2</td><td>Running against GDAL/OGR</td><td>1.9.2</td></tr><tr>

<td>GEOS Version</td><td>3.3.3</td><td>PostgreSQL Client Version</td><td>9.1.8</td></tr><tr><td>SpatiaLite Version</td><td>3.1.0-RC2</td><td>QWT Version</td><td>5.2.2</td></tr><tr><td>PROJ.4 Version</td><td>480</td><td>QScintilla2 Version</td>

<td></td></tr><tr><td colspan="4">This copy of QGIS writes debugging output.<br></td><td colspan="4"><br>R version 2.15.2 (2012-10-26) -- "Trick or Treat"<br><br></td></tr></tbody></table></span></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br></blockquote></div><br></div>