Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[BUGFIX][Processing][Rscript] Write output Table
Add support forwriting  output table to Rscript command.
  • Loading branch information
rldhont committed May 25, 2016
1 parent 2f49f6a commit f56c568
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/plugins/processing/algs/r/RAlgorithm.py
Expand Up @@ -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'
Expand All @@ -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()')
Expand Down

0 comments on commit f56c568

Please sign in to comment.