<div dir="ltr">Hi guys I hope I'm not to late for the lunch,<br><div> </div><div>I have attached a (mature draft) Rscript that check if all needed packages are installed (needed because in the given rscript.rsx there are some "require(..." or "library(...")</div>
<div>One my Linux it works fine.</div><div>Note that it currently doesn't check for SEXTANTE R default packages as raster/rgdal... but it would be no problem to add them by default.</div><div>Currently it installs to the default lib location (so you need to have write access (in the R promt if the folder does not exist R asks you if you want to create a libloc where you have write access, this could be problematic and this is probably the reason for the sextante /R lib loc?, if this is a problem, I can use the sextante R lib loc).</div>
<div><br></div><div>Depending on where you save these files the command is:</div><div>R CMD BATCH "--args ~/exampleScriptNotOk.rsx" ~/checkPac.R<br></div><div>R CMD BATCH "--args ~/exampleScriptOk.rsx" ~/checkPac.R<br>
</div><div><br></div><div>This command should be started on every Rscripr.rsx execution before the real execution as it tries to make sure thet the packages requirement are all ok. If no installation is required it is very fast, here 1/3 of a sec. see ceckPac.Rout for the full execution log</div>
<div><br></div><div>If this method is an option some testing from your side would be great! This is only a suggestion, ant it can be easily addapted/changed/enhanced.</div><div><br></div><div>Matteo</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/7/12 Alister Hood <span dir="ltr"><<a href="mailto:Alister.Hood@synergine.com" target="_blank">Alister.Hood@synergine.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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 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>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>