We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6629230 commit 13e6dcbCopy full SHA for 13e6dcb
src/sextante/r/RAlgorithm.py
@@ -227,6 +227,13 @@ def getExportCommands(self):
227
228
def getImportCommands(self):
229
commands = []
230
+ # if rgdal is not available, try to install it
231
+ # just use US mirror
232
+ commands.append('options("repos"="http://cran.us.r-project.org")')
233
+ rLibDir = "%s/rlibs" % SextanteUtils.userFolder()
234
+ if not os.path.isdir(rLibDir): os.mkdir(rLibDir)
235
+ commands.append(
236
+ 'tryCatch(find.package("rgdal"), error=function(e) install.packages("rgdal", lib="%s"))' % rLibDir)
237
commands.append("library(\"rgdal\")");
238
for param in self.parameters:
239
if isinstance(param, ParameterRaster):
0 commit comments