[Qgis-developer] SEXTANTE: R output?

Matteo Mattiuzzi matteo at mattiuzzi.com
Fri Jul 12 03:21:37 PDT 2013


Hi guys I hope I'm not to late for the lunch,

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(...")
One my Linux it works fine.
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.
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).

Depending on where you save these files the command is:
R CMD BATCH "--args ~/exampleScriptNotOk.rsx" ~/checkPac.R
R CMD BATCH "--args ~/exampleScriptOk.rsx" ~/checkPac.R

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

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.

Matteo


2013/7/12 Alister Hood <Alister.Hood at synergine.com>

> Hi guys,
> Speaking of R, would it be worth adding some maintenance scripts? e.g.
>
> update.packages(checkBuilt=TRUE)
>
> and even:
>
> if(!require(installr)) {
> install.packages("installr"); require(installr)} #load / install+load
> installr
> updateR()
>
> I'm not much of an R guy - maybe there are other things too.
>
> Regards,
> Alister
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130712/9e26bc83/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checkPac.R
Type: application/octet-stream
Size: 2268 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130712/9e26bc83/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleScriptNotOk.rsx
Type: application/octet-stream
Size: 420 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130712/9e26bc83/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleScriptOk.rsx
Type: application/octet-stream
Size: 500 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130712/9e26bc83/attachment-0005.obj>


More information about the Qgis-developer mailing list