[GRASS-user] v.class.mlR Error

Moritz Lennert mlennert at club.worldonline.be
Thu May 31 13:18:12 PDT 2018


Le Thu, 31 May 2018 13:14:39 -0700 (MST),
Helmut Kudrnovsky <hellik at web.de> a écrit :

> Moritz Lennert wrote
> > On 31/05/18 14:25, Helmut Kudrnovsky wrote:  
> >> Helmut Kudrnovsky wrote  
> >>>> Yes, obviously. Sorry for that.  
> >>>
> >>> no problem.
> >>>
> >>> patch applied:
> >>>
> >>> -------------
> >>> v.class.mlR --verbose segments_map=lsat7_segs_stats
> >>> training_map=training
> >>> train_class_colum=class processes=3
> >>> 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: '\g' is an unrecognized escape in character string starting
> >>> "'D:\g"
> >>>
> >>> ------------
> >>>
> >>> Error: '\g' is an unrecognized escape in character string starting
> >>> "'D:\g"
> >>>
> >>> there seems to be a path issue with shlashes  
> >> 
> >> added a g.message about the temporary file:
> >> 
> >> v.class.mlR --verbose segments_map=lsat7_segs_stats
> >> training_map=training train_class_colum=class processes=3
> >> temporary file:
> >> D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\10300.3.csv
> >> 
> >> AFAIR R in windows needs slashes, e.g.
> >>   
> >>> getwd()  
> >> [1] "C:/Users/myuser/Documents"  
> > 
> > 
> > Right.
> > 
> > Would replacing tempfile() with tempfile().replace('\\', '/') in
> > line 486 help ?
> > 
> > ISTR that there was a function for this somewhere, but can't find
> > it in a quick search.
> > 
> > Attached the again entire patch, but with the above change.  
> 
> yes, looks good now:

Great, thanks for the testing and feedback.

This said, if I understand the OP's message, the issue was in finding
Rscript in MS Windows. Do you have any recommendation on this ?

Moritz


More information about the grass-user mailing list