QGIS/python/plugins/sextante/r_local_library.patch
2013-03-06 15:29:57 +01:00

13 lines
594 B
Diff

diff --git a/r/RAlgorithm.py b/r/RAlgorithm.py
index 8b2ea4b..b8e9b35 100644
--- a/r/RAlgorithm.py
+++ b/r/RAlgorithm.py
@@ -276,6 +276,7 @@
commands.append('options("repos"="http://cran.us.r-project.org")')
rLibDir = "%s/rlibs" % SextanteUtils.userFolder().replace("\\","/")
if not os.path.isdir(rLibDir): os.mkdir(rLibDir)
+ commands.append('.libPaths("%s")' % rLibDir )
commands.append(
'tryCatch(find.package("rgdal"), error=function(e) install.packages("rgdal", lib="%s"))' % rLibDir)
commands.append("library(\"rgdal\")");