>I committed a patch in r72758 which now correctly applies the replace() >call to all tempfiles created. Please test.
tested now with export to files: ------------------- v.class.mlR -i segments_map=lsat7_segs_stats@user1 training_map=training@user1 train_class_column=class output_class_column=vote1 output_prob_column=prob1 folds=5 partitions=10 tunelength=10 weighting_metric=accuracy classification_results=D:\temp\vclassr\f1.txt accuracy_file=D:\temp\vclassr\f2.txt model_details=D:\temp\vclassr\f3.txt bw_plot_file=D:\temp\vclassr\bw.png r_script_file=D:\temp\vclassr\myRscript.R processes=4 Running R now. Following output is R output. Loading required package: caret Loading required package: lattice Loading required package: ggplot2 Loading required package: foreach Loading required package: iterators Loading required package: parallel Warning message: In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo, : There were missing values in resampled performance measures. Error in file(file, ifelse(append, "a", "w")) : cannot open the connection Calls: write.csv -> eval.parent -> eval -> eval -> write.table -> file In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'D: empclassr1.txt': Invalid argument Execution halted ERROR: There was an error in the execution of the R script. Please check the R output. Error in atexit._run_exitfuncs: Traceback (most recent call last): File "C:\OSGEO4~1\apps\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "C:\Users\hkmyr\AppData\Roaming\GRASS7\addons/scripts /v.class.mlR.py", line 237, in cleanup gscript.try_remove(model_output_csvt) NameError: global name 'model_output_csvt' is not defined Error in sys.exitfunc: Traceback (most recent call last): File "C:\OSGEO4~1\apps\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "C:\Users\hkmyr\AppData\Roaming\GRASS7\addons/scripts /v.class.mlR.py", line 237, in cleanup gscript.try_remove(model_output_csvt) NameError: global name 'model_output_csvt' is not defined (Fri Jun 01 18:55:30 2018) Command finished (2 min 22 sec) ------------------ it seems the path to the first file f1.txt can't be resolved. looking into myRscript.R ---- write.csv(resultsdf, 'D:\temp\vclassr\f1.txt', row.names=FALSE, quote=FALSE) df_means <- data.frame(method=names(models.cv),accuracy=accuracy_means, kappa=kappa_means) write.csv(df_means, 'D:\temp\vclassr\f2.txt', row.names=FALSE, quote=FALSE) sink('D:\temp\vclassr\f3.txt') ---- it seems also here is a / needed instead of \ within the path. ----- best regards Helmut -- Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user