Skip to content
Permalink
Browse files

[BUGFIX][Processing][Rscript] Write output Table

Add support forwriting  output table to Rscript command.
  • Loading branch information
rldhont committed May 24, 2016
1 parent 9928980 commit 3b7c0fc04f1a2f3a953f666bd5a6e8481835e22b
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/processing/algs/r/RAlgorithm.py
@@ -278,7 +278,7 @@ def getExportCommands(self):
value = value + '.tif'
commands.append('writeGDAL(' + out.name + ',"' + value
+ '")')
if isinstance(out, OutputVector):
elif isinstance(out, OutputVector):
value = out.value
if not value.endswith('shp'):
value = value + '.shp'
@@ -287,6 +287,10 @@ def getExportCommands(self):
filename = filename[:-4]
commands.append('writeOGR(' + out.name + ',"' + value + '","'
+ filename + '", driver="ESRI Shapefile")')
elif isinstance(out, OutputTable):
value = out.value
value = value.replace('\\', '/')
commands.append('write.csv(' + out.name + ',"' + value + '"')

if self.showPlots:
commands.append('dev.off()')

0 comments on commit 3b7c0fc

Please sign in to comment.
You can’t perform that action at this time.