[GRASS-SVN] r72758 - grass-addons/grass7/vector/v.class.mlR
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 1 04:52:41 PDT 2018
Author: mlennert
Date: 2018-06-01 04:52:41 -0700 (Fri, 01 Jun 2018)
New Revision: 72758
Modified:
grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
Log:
Added replace(\, /) where needed (for MS Win), simplified them where they already exist
Modified: grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py
===================================================================
--- grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py 2018-06-01 07:17:09 UTC (rev 72757)
+++ grass-addons/grass7/vector/v.class.mlR/v.class.mlR.py 2018-06-01 11:52:41 UTC (rev 72758)
@@ -343,8 +343,7 @@
bw_plot_file = options['bw_plot_file']
if allmap:
- feature_vars = gscript.tempfile()
- feature_vars = feature_vars.replace("\\", "/")
+ feature_vars = gscript.tempfile().replace("\\", "/")
gscript.run_command('v.db.select',
map_=allfeatures,
file_=feature_vars,
@@ -355,8 +354,7 @@
feature_vars = allfeatures.replace("\\", "/")
if trainmap:
- training_vars = gscript.tempfile()
- training_vars = training_vars.replace("\\", "/")
+ training_vars = gscript.tempfile().replace("\\", "/")
gscript.run_command('v.db.select',
map_=training,
file_=training_vars,
@@ -366,7 +364,7 @@
else:
training_vars = training.replace("\\", "/")
- r_commands = gscript.tempfile()
+ r_commands = gscript.tempfile().replace("\\", "/")
r_file = open(r_commands, 'w')
@@ -483,7 +481,7 @@
r_file.write("\n")
if allmap and not flags['f']:
- model_output = gscript.tempfile()
+ model_output = gscript.tempfile().replace("\\", "/")
model_output_csv = model_output + '.csv'
write_string = "write.csv(resultsdf, '%s'," % model_output_csv
write_string += " row.names=FALSE, quote=FALSE)"
More information about the grass-commit
mailing list