From 70d390727c5c70d5e85eeeba35001bee611c705c Mon Sep 17 00:00:00 2001 From: Stefan Blumentrath Date: Tue, 5 May 2015 19:09:30 +0200 Subject: [PATCH] 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? --- python/plugins/processing/algs/r/RAlgorithm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/plugins/processing/algs/r/RAlgorithm.py b/python/plugins/processing/algs/r/RAlgorithm.py index 10ef152b8d6..08e452ea56c 100644 --- a/python/plugins/processing/algs/r/RAlgorithm.py +++ b/python/plugins/processing/algs/r/RAlgorithm.py @@ -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: