Skip to content

Commit

Permalink
Merge pull request #3103 from rldhont/bugfix_processing_rscript_outpu…
Browse files Browse the repository at this point in the history
…t_table

[BUGFIX][Processing][Rscript] Write output Table
  • Loading branch information
volaya committed May 25, 2016
2 parents 1cddf8d + 3b7c0fc commit 6837996
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 @@ -281,7 +281,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 @@ -290,6 +290,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 6837996

Please sign in to comment.