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-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user