<div dir="ltr">hm isn't it exactly the script that I have send you some days ago?? (apart from the (easy) option for auto/manual installation)<div><br></div><div>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...</div>
<div>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.</div><div><br></div><div>Sorry in case I'm misunderstanding!</div><div><br></div><div>
<br></div><div><div style="font-family:arial,sans-serif;font-size:13px">>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'. </div>
</div><div><br></div><div>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.</div>
<div><br></div><div>Matteo</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/17 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">Hi all<br>
<br>
We have been discussing some issues with packages in R, and I would<br>
like to share some ideas wth you<br>
<br>
The goal is to make package installation as easy and practical as<br>
possible, so scripts can run with minor settings<br>
<br>
I am thinking that a good solution would be to check for packages<br>
needed by a script, checking calls to library(). With that, package<br>
installation commands could be included, as it is done now with rgdal<br>
and raster, with a code like this<br>
<br>
'tryCatch(find.package("rgdal"), error=function(e)<br>
install.packages("rgdal", dependencies=TRUE))')<br>
<br>
replace "rgdal" with the lib the script uses...and it should be fine, right?<br>
<br>
two problems in here:<br>
<br>
1) if the user has no permissions that will not work, but I can<br>
implement a way of checking what is needed and what is installed in<br>
case the algorithm fails, so I can inform the user to manually install<br>
the reuqired packages<br>
<br>
2)to avoid installing things automatically, for users that might not<br>
like that behaviour, this can be turned off, so manual intallation is<br>
required.<br>
<br>
All this would go on the default lib path, since we agreed that it is<br>
a better option than having a custom one that might duplicate packages<br>
<br>
Comments are welcome<br>
<br>
Thanks in advance!<br>
<br>
Victor<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>
</blockquote></div><br></div>