[GRASS-user] v.class.mlR Error

Moritz Lennert mlennert at club.worldonline.be
Thu May 31 07:15:10 PDT 2018


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.

Moritz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: v_class_mlR_tempfile.diff
Type: text/x-patch
Size: 2149 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180531/c3dd0d8c/attachment.bin>


More information about the grass-user mailing list