Add .libPaths() to R scripts for Windows

Hopefully a more proper attempt to fix http://hub.qgis.org/issues/11603 directly in processing by means of providing an option to define a path for user libraries on MS Windows. Not sure if this could be useful for other OSes too?
This commit is contained in:
Stefan Blumentrath 2015-05-05 19:09:30 +02:00
parent 3fcc101446
commit 70d390727c

View File

@ -285,6 +285,8 @@ class RAlgorithm(GeoAlgorithm):
commands.append('options("repos"="http://cran.at.r-project.org/")')
# Try to install packages if needed
if isWindows():
commands.append('.libPaths(\"' + str(RUtils.RLibs()).replace('\\','/') + '\")')
packages = RUtils.getRequiredPackages(self.script)
packages.extend(['rgdal', 'raster'])
for p in packages: