[GRASS-user] v.class.mlR error
Moritz Lennert
mlennert at club.worldonline.be
Thu May 25 01:15:28 PDT 2017
Le Thu, 25 May 2017 00:25:57 +0200,
Markus Neteler <neteler at osgeo.org> a écrit :
> On Wed, May 24, 2017 at 12:14 PM, James Duffy
> <james.philip.duffy at gmail.com> wrote:
> ...
> > v.class.mlR --verbose segments_map=seg_stats_vec at MAP1
> ...
> > My GRASS mapset is located in - C:\Sandbox\RGRASS\TEST\MAP1
> >
> > Given that R takes paths with / rather than \, I think the issue
> > lies at the start of the R part of the script which reads:
> >
> > require(caret)
> > features <-
> > read.csv("C:\Sandbox\RGRASS\TEST\MAP1\.tmp/unknown\5636.0",
> > sep="|", header=TRUE, row.names=1) training <-
> > read.csv("C:\Sandbox\RGRASS\TEST\MAP1\.tmp/unknown\5636.1",
> > sep="|", header=TRUE, row.names=1)
> >
> > I have run v.class.mlR on an osgeolive build before, but not on
> > Windows. Is this a Windows specific issue that needs addressing?
>
> In the script I see things like
> reclass_files[classifier] = tmpfilename.replace("\\",
> "/")
>
> which is probably unhelpful on Windows. Not sure how to make that
> portable, though.
I had forgotten that I had already done this elsewhere in the
module... ;-)
It is actually there exactly for Windows: tempfile() creates a path
with \, but in R these have to either be escaped, or modified into / as
R (and I think Windows in general) can handle paths with forward
slashes.
I had answered James, but I now notice that it was from a wrong
address, so the mail didn't get through to the list.
I've now just comitted a fix using the same technique.
James, can you just reinstall v.class.mlR and try again ?
Moritz
More information about the grass-user
mailing list