<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">>Ok, fine then. Only in the canonical libpath. :-)</span><div><br></div><div>Yes I guess it it the saver choice.<br style="font-family:arial,sans-serif;font-size:13px">
<div class="im" style="font-family:arial,sans-serif;font-size:13px"><br>>>I think it is (quite) easily possible to remove the need of R knowledge for a lot of situations, one of these it the installation and update of packages. It is much easier to share a Rscript (rsx) to another system if not installed packages are added automatically.<br>
<br></div><span style="font-family:arial,sans-serif;font-size:13px">>I agree with that, but what I mean is that the person that writes the</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">script should take care of all the installation/checking/etc code. He</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">should put all that sanity code in his plugin, not expect SEXTANTE to</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">do it, because that makes things less flexible, and it seems that we</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">cannot come to a good solution on that. That's what I meant. </span></div><div><br></div><div><span style="font-family:arial,sans-serif">A script writer can care about the own environment but not so much on the one of others (just the loading can be handled with ease). R it to much modular it is not possible (for what I know) to provide a fully operation plugin if a package is not available locally.</span><br>
</div><div><font face="arial, sans-serif">So probably every script need to have in its documentation which library has to be present, and a reference to a doc on how to install libraries in R. Probably this is a good solution.</font></div>
<div><font face="arial, sans-serif">Or/And SEXTANTE provides with a script like the one I have send you with the capability to checkout for required packages. </font><span style="font-family:arial,sans-serif">So if that script fails (the info which library has to be loaded comes from the sript.rsx), the info 'can not install package XXX' see doc... would help further to manually install.</span></div>
<div><span style="font-family:arial,sans-serif">But as QGIS is now close to release (for what I know) it could be a development that happens after that... (but I don't want to make pressure on that!). </span></div><div>
<font face="arial, sans-serif"> </font></div><div><font face="arial, sans-serif">I'm always thinking of SEXTANTE as a possibility more for non R-users.</font></div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">>Of course </span><span style="font-family:arial,sans-serif;font-size:13px">I like the idea of sharing scripts :-)</span><br style="font-family:arial,sans-serif;font-size:13px">
Great count on me! (for all these things!)<br><br>Yes I think Error handing (communication) is very important!</div><div>and also an update script could be made that could be started from the SEXTANTE options and configuration.<br>
<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">Cheers</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/12 Victor Olaya <span dir="ltr"><<a href="mailto:volayaf@gmail.com" target="_blank">volayaf@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, fine then. Only in the canonical libpath. :-)<br>
<div class="im"><br>
>I think it is (quite) easily possible to remove the need of R knowledge for a lot of situations, one of these it the installation and update of packages. It is much easier to share a Rscript (rsx) to another system if not installed packages are added automatically.<br>

<br>
</div>I agree with that, but what I mean is that the person that writes the<br>
script should take care of all the installation/checking/etc code. He<br>
should put all that sanity code in his plugin, not expect SEXTANTE to<br>
do it, because that makes things less fllexible, and it seems that we<br>
cannot come to a good solution on that. That's what I meant. Of course<br>
I like the idea of sharing scripts :-)<br>
<br>
Cheers<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
2013/7/12 Matteo Mattiuzzi <<a href="mailto:matteo@mattiuzzi.com">matteo@mattiuzzi.com</a>>:<br>
> Hi Victor,<br>
> Having a separated libloc causes also a maintenance problem, as the libs in<br>
> there can only be updated (with ease) by SEXTANTE, that does not (?) update<br>
> them. I also think that it is better to have everything on system level but<br>
> there are also environments where a user has no writing privileges outside<br>
> its user space and a user libloc is required (this does R by default in such<br>
> a case, but it asks the user to create that dir if it doesn't already exits,<br>
> and R re-connects to that user libloc every time it starts with the same<br>
> user).<br>
><br>
> So except for the problem (esily to solve) of permissions and user libloc I<br>
> would stay within R defaults.<br>
><br>
> I think that SEXTANTE offers a good place to share scripts, _especially_ for<br>
> non R experts (like the example scripts). I.e. I create an R-script that my<br>
> colleagues can use without knowing R. I think this is one of the great<br>
> things of SEXTANTE!<br>
><br>
> I think it is (quite) easily possible to remove the need of R knowledge for<br>
> a lot of situations, one of these it the installation and update of<br>
> packages. It is much easier to share a Rscript (rsx) to another system if<br>
> not installed packages are added automatically.<br>
><br>
> It could be interesting to have also a online repository of RSX scripts,<br>
> isn't every R-script is a bit like a plugin!?<br>
><br>
> Cheers, Matteo<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> 2013/7/12 Victor Olaya <<a href="mailto:volayaf@gmail.com">volayaf@gmail.com</a>><br>
>><br>
>> Matteo<br>
>><br>
>> Thanks for your help<br>
>><br>
>> After some thinking and discussion, I think that the best and easiest<br>
>> solutions is just to have a separate SEXTANTE environment, with its<br>
>> own libPath. This is the current configuration, but it was not<br>
>> correctly set, so libs were installed tere, but not used from there<br>
>> later. With Donovan's solution, this wil be easy to fix.<br>
>><br>
>> The R connector in SXTANTE is supposed to be used by people that can<br>
>> use R and write R scripts, so I guess we can let them add the<br>
>> necessary install commands for their scripts. SEXTANTE will just take<br>
>> care of rgdal, since that is used very often.<br>
>><br>
>> What I will try to do is:<br>
>> - document this in detail in the manual<br>
>> - improve the error handling, so if the R script cannot be run due to<br>
>> a missing dependency, SEXTANTE will inform the user. For this, your<br>
>> scripts might be useful.<br>
>><br>
>> I want to treat the R scripts much in the same way as the Python<br>
>> scripts. If you need a lib (other that the ones installed with QGIS),<br>
>> you have to install it yourself, modify the PYTHONPATH add the import<br>
>> sentences, etc...and I assume that you know Python well enough to take<br>
>> care of that. The same goes with R scripts. By having a separate R<br>
>> environment, I guess this is easier and also it will not interfere in<br>
>> the "normal" usage of R outside SEXTANTE. And we also get rid of the<br>
>> problem of not having priviledges to install new packages, since all<br>
>> goes to the home folder.<br>
>><br>
>> What do you think of this?<br>
>><br>
>> Thanks again!<br>
>> Victor<br>
>><br>
>><br>
>><br>
>> 2013/7/12 Matteo Mattiuzzi <<a href="mailto:matteo@mattiuzzi.com">matteo@mattiuzzi.com</a>>:<br>
>> > Hi guys I hope I'm not to late for the lunch,<br>
>> ><br>
>> > I have attached a (mature draft) Rscript that check if all needed<br>
>> > packages<br>
>> > are installed (needed because in the given rscript.rsx there are some<br>
>> > "require(..." or "library(...")<br>
>> > One my Linux it works fine.<br>
>> > Note that it currently doesn't check for SEXTANTE R default packages as<br>
>> > raster/rgdal... but it would be no problem to add them by default.<br>
>> > Currently it installs to the default lib location (so you need to have<br>
>> > write<br>
>> > access (in the R promt if the folder does not exist R asks you if you<br>
>> > want<br>
>> > to create a libloc where you have write access, this could be<br>
>> > problematic<br>
>> > and this is probably the reason for the sextante /R lib loc?, if this is<br>
>> > a<br>
>> > problem, I can use the sextante R lib loc).<br>
>> ><br>
>> > Depending on where you save these files the command is:<br>
>> > R CMD BATCH "--args ~/exampleScriptNotOk.rsx" ~/checkPac.R<br>
>> > R CMD BATCH "--args ~/exampleScriptOk.rsx" ~/checkPac.R<br>
>> ><br>
>> > This command should be started on every Rscripr.rsx execution before the<br>
>> > real execution as it tries to make sure thet the packages requirement<br>
>> > are<br>
>> > all ok. If no installation is required it is very fast, here 1/3 of a<br>
>> > sec.<br>
>> > see ceckPac.Rout for the full execution log<br>
>> ><br>
>> > If this method is an option some testing from your side would be great!<br>
>> > This<br>
>> > is only a suggestion, ant it can be easily addapted/changed/enhanced.<br>
>> ><br>
>> > Matteo<br>
>> ><br>
>> ><br>
>> > 2013/7/12 Alister Hood <<a href="mailto:Alister.Hood@synergine.com">Alister.Hood@synergine.com</a>><br>
>> >><br>
>> >> Hi guys,<br>
>> >> Speaking of R, would it be worth adding some maintenance scripts? e.g.<br>
>> >><br>
>> >> update.packages(checkBuilt=TRUE)<br>
>> >><br>
>> >> and even:<br>
>> >><br>
>> >> if(!require(installr)) {<br>
>> >> install.packages("installr"); require(installr)} #load / install+load<br>
>> >> installr<br>
>> >> updateR()<br>
>> >><br>
>> >> I'm not much of an R guy - maybe there are other things too.<br>
>> >><br>
>> >> Regards,<br>
>> >> Alister<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>
>> ><br>
>> ><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>
><br>
><br>
</div></div></blockquote></div><br></div>