[Qgis-developer] More ideas about package installation in R for SEXTANTE

Matteo Mattiuzzi matteo at mattiuzzi.com
Thu Jul 18 05:31:24 PDT 2013


hm isn't it exactly the script that I have send you some days ago?? (apart
from the (easy) option for auto/manual installation)

It detects library() and require() in a rsx-file, tries to install these
packages to the default path, and returns a warning (a text file with
required infos to manually install) if one or more packages have not been
installed by the routine...
In the documentation of any script there should be the list of required
R-packages and a link to a how to manually install it.

Sorry in case I'm misunderstanding!


>More broadly, it would also be nice if R could be provided 'out of the
box' in our standalone installer for windows (and osgeo4w too I guess) - I
know the complicated installation process prevents many users from 'giving
it a try'.

If this means to have an alternative R installation, with all its
maintenance is not that practical...an automatic installation of R and some
SEXTANTE default packages ok, but I think it should happen on the R-default
location and only if not yet installed.

Matteo




2013/7/17 Victor Olaya <volayaf at gmail.com>

> Hi all
>
> We have been discussing some issues with packages in R, and I would
> like to share some ideas wth you
>
> The goal is to make package installation as easy and practical as
> possible, so scripts can run with minor settings
>
> I am thinking that a good solution would be to check for packages
> needed by a script, checking calls to library(). With that, package
> installation commands could be included, as it is done now with rgdal
> and raster, with a code like this
>
> 'tryCatch(find.package("rgdal"), error=function(e)
> install.packages("rgdal", dependencies=TRUE))')
>
> replace "rgdal" with the lib the script uses...and it should be fine,
> right?
>
> two problems in here:
>
> 1) if the user has no permissions that will not work, but I can
> implement a way of checking what is needed and what is installed in
> case the algorithm fails, so I can inform the user to manually install
> the reuqired packages
>
> 2)to avoid installing things automatically, for users that might not
> like that behaviour, this can be turned off, so manual intallation is
> required.
>
> All this would go on the default lib path, since we agreed that it is
> a better option than having a custom one that might duplicate packages
>
> Comments are welcome
>
> Thanks in advance!
>
> Victor
> _______________________________________________
> 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/20130718/3c460b92/attachment-0001.html>


More information about the Qgis-developer mailing list