<div dir="ltr">Hi Moritz and Helmut,<div><br></div><div>Great proactive energy. Highly appreciated!</div><div><br></div><div>For clarity, tomorrow I should install the v.class.mlR again and test it? Should I also install the needed packages first in R as stated in one of the messages?</div><div>I will not have access to the same computer this weekend, but I can try to test on another station.</div><div><br></div><div>Best,</div><div>Jamille</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 1, 2018 at 2:02 PM, Helmut Kudrnovsky <span dir="ltr"><<a href="mailto:hellik@web.de" target="_blank">hellik@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>I committed a patch in r72758 which now correctly applies the replace()<br>
>call to all tempfiles created. Please test. <br>
<br>
</span>tested now with export to files:<br>
<br>
-------------------<br>
v.class.mlR -i segments_map=lsat7_segs_stats@<wbr>user1<br>
training_map=training@user1 train_class_column=class<br>
output_class_column=vote1 output_prob_column=prob1 folds=5 partitions=10<br>
tunelength=10 weighting_metric=accuracy<br>
classification_results=D:\<wbr>temp\vclassr\f1.txt<br>
accuracy_file=D:\temp\vclassr\<wbr>f2.txt model_details=D:\temp\vclassr\<wbr>f3.txt<br>
bw_plot_file=D:\temp\vclassr\<wbr>bw.png<br>
r_script_file=D:\temp\vclassr\<wbr>myRscript.R processes=4<br>
<span class="">Running R now. Following output is R output.<br>
</span><span class="">Loading required package: caret<br>
Loading required package: lattice<br>
Loading required package: ggplot2<br>
Loading required package: foreach<br>
Loading required package: iterators<br>
Loading required package: parallel<br>
Warning message:<br>
In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :<br>
  There were missing values in resampled performance measures.<br>
</span><span class="">Error in file(file, ifelse(append, "a", "w")) : <br>
  cannot open the connection<br>
Calls: write.csv -> eval.parent -> eval -> eval -> write.table -> file<br>
In addition: Warning message:<br>
</span><span class="">In file(file, ifelse(append, "a", "w")) :<br>
</span>  cannot open file 'D:  emp classr 1.txt': Invalid argument<br>
<span class="">Execution halted<br>
ERROR: There was an error in the execution of the R script.<br>
Please check the R output.<br>
Error in atexit._run_exitfuncs:<br>
</span><span class="">Traceback (most recent call last):<br>
</span><span class="">  File "C:\OSGEO4~1\apps\Python27\<wbr>lib\atexit.py", line 24,<br>
in _run_exitfuncs<br>
    func(*targs, **kargs)<br>
  File "C:\Users\hkmyr\AppData\<wbr>Roaming\GRASS7\addons/scripts<br>
/<a href="http://v.class.mlR.py" rel="noreferrer" target="_blank">v.class.mlR.py</a>", line 237, in cleanup<br>
    gscript.try_remove(model_<wbr>output_csvt)<br>
NameError: global name 'model_output_csvt' is not defined<br>
Error in sys.exitfunc:<br>
</span><span class="">Traceback (most recent call last):<br>
</span><span class="">  File "C:\OSGEO4~1\apps\Python27\<wbr>lib\atexit.py", line 24,<br>
in _run_exitfuncs<br>
    func(*targs, **kargs)<br>
  File "C:\Users\hkmyr\AppData\<wbr>Roaming\GRASS7\addons/scripts<br>
/<a href="http://v.class.mlR.py" rel="noreferrer" target="_blank">v.class.mlR.py</a>", line 237, in cleanup<br>
    gscript.try_remove(model_<wbr>output_csvt)<br>
NameError: global name 'model_output_csvt' is not defined<br>
</span>(Fri Jun 01 18:55:30 2018) Command finished (2 min 22 sec)       <br>
------------------<br>
<br>
it seems the path to the first file f1.txt can't be resolved.<br>
<br>
looking into myRscript.R<br>
<br>
----<br>
write.csv(resultsdf, 'D:\temp\vclassr\f1.txt', row.names=FALSE, quote=FALSE)<br>
df_means <- data.frame(method=names(<a href="http://models.cv" rel="noreferrer" target="_blank">models<wbr>.cv</a>),accuracy=accuracy_means,<br>
kappa=kappa_means)<br>
write.csv(df_means, 'D:\temp\vclassr\f2.txt', row.names=FALSE, quote=FALSE)<br>
sink('D:\temp\vclassr\f3.txt')<br>
----<br>
<br>
it seems also here is a / needed instead of \ within the path.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
-----<br>
best regards<br>
Helmut<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/Grass-Users-<wbr>f3884509.html</a><br>
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></div></div></blockquote></div><br></div>