<div dir="ltr"><div><div><div><div>HI Daniel,<br></div>you can also find a small small tutorial here:<br><br><a href="https://github.com/qgis/QGIS-Documentation/blob/master/source/docs/training_manual/processing/r_intro.rst">https://github.com/qgis/QGIS-Documentation/blob/master/source/docs/training_manual/processing/r_intro.rst</a><br><br></div>You are more then welcome if you want to add some of your scripts or if you want to write some tutorial/exercise.<br><br></div>Cheers<br><br></div>Matteo<br><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-11 6:12 GMT+02:00 Daniel Torres <span dir="ltr"><<a href="mailto:nobeeakon@gmail.com" target="_blank">nobeeakon@gmail.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"><div>Hi every one, I'm having a hard time with Sextante and R. I'm trying to make a little script to calculate the sum of a variable per cathegory, the script runs in R, but I can't understand how to make it work in QGIS... <br><br></div><div>I haven't found many examples on QGIS-R, and the few ones use only one variable...<br><br></div><div>Any help is welcome (any documentation or examples are very welcome), <br></div><div>Thanks,<br></div><div>Daniel<br></div><div><br></div><div><br></div><div><br><br>##Basic statistics=group<br>##Layer=vector<br>##valores=Field Layer<br>##categorias=Field Layer<br>valores<-Layer[[valores]]<br>categorias<-Layer[[categorias]]<br>catego<-as.factor(categorias)<br>catego_unicos<-unique(catego)<br>suma<-NA;suma<-data.frame(suma)<br>for(i in 1:length(catego_unicos)){<br>suma[i,1]<-sum(valores[catego==catego_unicos[i]])<br>}<br>colnames(suma)<-"suma"<br>rownames(suma)<-catego_unicos<br>>suma<br><br></div></div>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div>