Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Veronica Andreo
Hi again,

So, I tested as suggested:
1. Open R console within OSGeo4W Shell,
2. library(rgrass7)
3. initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase =
'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset
= 'user1', SG='elevation')

and I now get:
unused argument (gisDbase = 'C:/Users/RETA/Documents/grassdata')

anything else to test/set?

best,
Vero


El dom., 16 sept. 2018 a las 23:15, Helmut Kudrnovsky ()
escribió:

> >OK, thanks for confirming that OSGeo4W remains feasible for rgrass7; I
> don't
> have access. Does usability >include initGRASS()? This would be most
> fragile
> because environment variables are being set, and >condition on Windows and
> OSGeo4W.
>
> R within a GRASS session works quite well so far.
>
> did a fresh svn up of
>
> svn://r-forge.r-project.org/svnroot/spgrass
>
> and quickly screened pkg\rgrass7\R\initGRASS.R:
>
> e.g.
>
> Sys.setenv(GRASS_PROJSHARE=paste(Sys.getenv("GISBASE"),
> "\\proj", sep=""))
>
> AFAIK at least the GRASS7.4.x line doesn't use anymore an own copy of the
> PROJSHARE files; instead it uses the PROJ files itself; that's for all
> platforms (linux, MacOS, MS Windows, ...).
>
> e.g. in OSGeo4W 64bit it's defined as:
>
> SET OSGEO4W_ROOT=C:\OSGeo4W64
> set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
>
> only in the standalone installer, it's still defined as:
>
> set GRASS_PROJSHARE=%GISBASE%\share\proj
>
> because it's bundled in the installer.
>
> e.g.
>
> Sys.setenv(PATH=paste(Sys.getenv("GISBASE"), "\\extrabin;",
> Sys.getenv("PATH"), sep=""))
>
> there is no C:\OSGeo4W64\apps\grass\grass-7.4.1, because all of the
> dependencies etc are living e.g. in
> C:\OSGeo4W64\bin, C:\OSGeo4W64\lib, ...
>
> I'm not sure about this one:
>
> [...]
> Sys.setenv(GISBASE=gisBase)
> if (missing(home)) home <- Sys.getenv("USERPROFILE")
> [...]
> Sys.setenv(GISRC=paste(Sys.getenv("HOME"), "\\.grassrc7", sep=""))
>
> in winGRASS (standalone, OSGeo4W), the rc file lives in
> C:\Users\YourUserName\AppData\Roaming\GRASS7 and not in %USERPROFILE%
>
> and it seems around these lines:
>
> [...]
> Sys.setenv(GISRC="junk")
> cat("GISDBASE:", getwd(), "\n", file=Sys.getenv("GISRC"))
> cat("LOCATION_NAME: ", "\n", file=Sys.getenv("GISRC"),
> append=TRUE)
> cat("MAPSET: ", "\n", file=Sys.getenv("GISRC"),
> append=TRUE)
> gisrc <- ifelse (use_g.dirseps.exe, system(paste("g.dirseps.exe
> -g",
> shQuote(Sys.getenv("GISRC"))), intern=TRUE),
> Sys.getenv("GISRC"))
> [...]
>
> initGRASS gets in trouble in OSGeo4W.
>
>
>
> -
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
> ___
> grass-stats mailing list
> grass-stats@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-stats
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Helmut Kudrnovsky
>OK, thanks for confirming that OSGeo4W remains feasible for rgrass7; I don't
have access. Does usability >include initGRASS()? This would be most fragile
because environment variables are being set, and >condition on Windows and
OSGeo4W.

R within a GRASS session works quite well so far.

did a fresh svn up of 

svn://r-forge.r-project.org/svnroot/spgrass

and quickly screened pkg\rgrass7\R\initGRASS.R:

e.g.

Sys.setenv(GRASS_PROJSHARE=paste(Sys.getenv("GISBASE"),
"\\proj", sep=""))

AFAIK at least the GRASS7.4.x line doesn't use anymore an own copy of the
PROJSHARE files; instead it uses the PROJ files itself; that's for all
platforms (linux, MacOS, MS Windows, ...).

e.g. in OSGeo4W 64bit it's defined as:

SET OSGEO4W_ROOT=C:\OSGeo4W64
set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj

only in the standalone installer, it's still defined as:

set GRASS_PROJSHARE=%GISBASE%\share\proj

because it's bundled in the installer.

e.g.

Sys.setenv(PATH=paste(Sys.getenv("GISBASE"), "\\extrabin;",
Sys.getenv("PATH"), sep=""))

there is no C:\OSGeo4W64\apps\grass\grass-7.4.1, because all of the
dependencies etc are living e.g. in 
C:\OSGeo4W64\bin, C:\OSGeo4W64\lib, ...

I'm not sure about this one:

[...]
Sys.setenv(GISBASE=gisBase)
if (missing(home)) home <- Sys.getenv("USERPROFILE")
[...]
Sys.setenv(GISRC=paste(Sys.getenv("HOME"), "\\.grassrc7", sep=""))

in winGRASS (standalone, OSGeo4W), the rc file lives in
C:\Users\YourUserName\AppData\Roaming\GRASS7 and not in %USERPROFILE%

and it seems around these lines:

[...]
Sys.setenv(GISRC="junk")
cat("GISDBASE:", getwd(), "\n", file=Sys.getenv("GISRC"))
cat("LOCATION_NAME: ", "\n", file=Sys.getenv("GISRC"),
append=TRUE)
cat("MAPSET: ", "\n", file=Sys.getenv("GISRC"),
append=TRUE)
gisrc <- ifelse (use_g.dirseps.exe, system(paste("g.dirseps.exe -g",
shQuote(Sys.getenv("GISRC"))), intern=TRUE),
Sys.getenv("GISRC"))
[...]

initGRASS gets in trouble in OSGeo4W.



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Veronica Andreo
Perfect, will test and report back in case of any issue.
Thanks, Helli :)

El dom., 16 sept. 2018 a las 17:00, Helmut Kudrnovsky ()
escribió:

> >Should I open R from OSGeo4W command console and then init grass there? Is
> that the workflow?
>
> Yes, that's the workflow.
>
> because environment variables for e.g. gdal, proj4 etc have to be set. And
> that's nicely done in the OSGeo4W command line
>
>
>
> -
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
> ___
> grass-stats mailing list
> grass-stats@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-stats
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Helmut Kudrnovsky
>Should I open R from OSGeo4W command console and then init grass there? Is
that the workflow?

Yes, that's the workflow.

because environment variables for e.g. gdal, proj4 etc have to be set. And
that's nicely done in the OSGeo4W command line



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Roger Bivand
Sorry, no idea. Testing was from R for Windows using initGRASS(), but a long 
time ago. Starting R from within GRASS, picking up the environment variables 
already created during GRASS startup msy be less fragile, as you are using an 
existing location.

Roger

Roger Bivand
Norwegian School of Economics
Bergen, Norway




On Sun, Sep 16, 2018 at 4:43 PM +0200, "Veronica Andreo" 
mailto:veroand...@gmail.com>> wrote:

Hi Helli, Roger

No, I just opened R console (installed outside OSGeo4W) and from there, I tried 
to init grass.
Should I open R from OSGeo4W command console and then init grass there? Is that 
the workflow?

best,
Vero

El dom., 16 sept. 2018 a las 16:25, Helmut Kudrnovsky 
(mailto:hel...@web.de>>) escribió:
Veronica Andreo wrote
> Hello,
>
> I am preparing a one week GRASS GIS course and I mostly expect Windows
> users, so I recommend to install from OSGeo4W that allows to easily
> install
> also QGIS, msys (to get nice bash tricks) and other libraries that are
> then
> needed for some grass add-ons.
>
> The last day of the course, I'll show the connection with R. Now, starting
> R within a grass session works as expected. But I get errors when trying
> to
> initialize GRASS (installed from OSGeo4W) from R console. I am following
> the instructions in the wiki [0]
>
> First, I had to change the slashes from windows type, to linux type
> (because I got:
> Error: '\O' in an unrecognized escape in character string ""C:\O").
>
> After that, I get the following:
>
>> initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase =
> 'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset
> = 'user1', SG='elevation')
> Error in if (!compatible) { : argumento tiene longitud cero
> Además: Warning messages:
> 1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :
> comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309
> 2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE)
> :
> comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"'
> tiene estatus 309
> 3: In dir.create(loc_path) :
> cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or
> directory'
> 4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or
> directory'
> 5: In dir.create(paste(loc_path, mapset, sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or
> directory'
> 6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
> comando ejecutado 'g.version.exe' tiene estatus 309
>
> Any hints? I also attach a screenshot with the message that appears (I
> cannot copy/paste the text in that message)
>
> Thanks much in advance!
> Vero
>
> [0] https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
>
> ___
> grass-stats mailing list

> grass-stats@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-stats
>
> Rgui_2018-09-13_22-19-45.png (73K)
> http://osgeo-org.1560.x6.nabble.com/attachment/5378245/0/Rgui_2018-09-13_22-19-45.png;

it's a missing dll.

Are you invoking R from inside the OSGeo4W command console?



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Roger Bivand
OK, thanks for confirming that OSGeo4W remains feasible for rgrass7; I don't 
have access. Does usability include initGRASS()? This would be most fragile 
because environment variables are being set, and condition on Windows and 
OSGeo4W.

Roger


Fra: Helmut Kudrnovsky
Sendt: søndag 16. september, 16.37
Emne: Re: [GRASS-stats] Error when starting grass from R (grassinstalledthru 
osgeo4w)
Til: grass-stats@lists.osgeo.org


Roger Bivand wrote > Note that rgrass7 has not been tested on OSGeo4W for many 
years, so the > logic differences from Windows may no longer hold. Using Live 
has often > been a better choice, but as I never use QGIS, I've no experience. 
Reports > on issues with OSGei4W welcome. > > Roger > > Roger Bivand > 
Norwegian School of Economics > Bergen, Norway > > > > Fra: Helmut Kudrnovsky > 
Sendt: søndag 16. september, 16.26 > Emne: Re: [GRASS-stats] Error when 
starting grass from R (grass > installedthru osgeo4w) > Til: > 
grass-stats@.osgeo > > > Veronica Andreo wrote > Hello, > > I am preparing a 
one week GRASS GIS > course and I mostly expect Windows > users, so I recommend 
to install from > OSGeo4W that allows to easily > install > also QGIS, msys (to 
get nice > bash tricks) and other libraries that are > then > needed for some 
grass > add-ons. > > The last day of the course, I'll show the connection with 
R. > Now, starting > R within a grass session works as expected. But I get > 
errors when trying > to > initialize GRASS (installed from OSGeo4W) from R > 
console. I am following > the instructions in the wiki [0] > > First, I > had 
to change the slashes from windows type, to linux type > (because I > got: > 
Error: '\O' in an unrecognized escape in character string ""C:\O"). > > > After 
that, I get the following: > >> initGRASS(gisBase = > 
'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase = > > 
'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset > > 
= 'user1', SG='elevation') > Error in if (!compatible) { : argumento > tiene 
longitud cero > Además: Warning messages: > 1: In > system(paste("g.dirseps.exe 
-g", shQuote(Sys.getenv("GISRC"))), : > > comando ejecutado 'g.dirseps.exe -g 
"junk"' tiene estatus 309 > 2: In > system(paste("g.dirseps.exe -g", 
shQuote(gisDbase)), intern = TRUE) > : > > comando ejecutado 'g.dirseps.exe -g 
"C:/Users/RETA/Documents/grassdata"' > > tiene estatus 309 > 3: In 
dir.create(loc_path) : > cannot create dir > 'NA\nc_spm_08_grass7', reason 'No 
such file or > directory' > 4: In > dir.create(paste(loc_path, "PERMANENT", sep 
= "/")) : > cannot create dir > 'NA\nc_spm_08_grass7\PERMANENT', reason 'No 
such file or > directory' > 5: > In dir.create(paste(loc_path, mapset, sep = 
"/")) : > cannot create dir > 'NA\nc_spm_08_grass7\user1', reason 'No such file 
or > directory' > 6: In > system(paste("g.version", get("addEXE", envir = 
.GRASS_CACHE), : > comando > ejecutado 'g.version.exe' tiene estatus 309 > > 
Any hints? I also attach a > screenshot with the message that appears (I > 
cannot copy/paste the text > in that message) > > Thanks much in advance! > 
Vero > > [0] > 
https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R > > > 
___ > grass-stats mailing list > > 
grass-stats@.osgeo > > https://lists.osgeo.org/mailman/listinfo/grass-stats > > 
> Rgui_2018-09-13_22-19-45.png (73K) > > 

 > it's a missing dll. Are you invoking R from inside the OSGeo4W command > 
console? - best regards Helmut -- Sent from: > 
http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html > 
___ grass-stats mailing list > 
grass-stats@.osgeo > https://lists.osgeo.org/mailman/listinfo/grass-stats > > > 
___ > grass-stats mailing list > 
grass-stats@.osgeo > https://lists.osgeo.org/mailman/listinfo/grass-stats 
Working for years now winGRASS-R only in OSGeo4w, I would call it well tested. 
- best regards Helmut -- Sent from: 
http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html 
___ grass-stats mailing list 
grass-stats@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-stats

___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Veronica Andreo
Hi Helli, Roger

No, I just opened R console (installed outside OSGeo4W) and from there, I
tried to init grass.
Should I open R from OSGeo4W command console and then init grass there? Is
that the workflow?

best,
Vero

El dom., 16 sept. 2018 a las 16:25, Helmut Kudrnovsky ()
escribió:

> Veronica Andreo wrote
> > Hello,
> >
> > I am preparing a one week GRASS GIS course and I mostly expect Windows
> > users, so I recommend to install from OSGeo4W that allows to easily
> > install
> > also QGIS, msys (to get nice bash tricks) and other libraries that are
> > then
> > needed for some grass add-ons.
> >
> > The last day of the course, I'll show the connection with R. Now,
> starting
> > R within a grass session works as expected. But I get errors when trying
> > to
> > initialize GRASS (installed from OSGeo4W) from R console. I am following
> > the instructions in the wiki [0]
> >
> > First, I had to change the slashes from windows type, to linux type
> > (because I got:
> > Error: '\O' in an unrecognized escape in character string ""C:\O").
> >
> > After that, I get the following:
> >
> >> initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase =
> > 'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7',
> mapset
> > = 'user1', SG='elevation')
> > Error in if (!compatible) { : argumento tiene longitud cero
> > Además: Warning messages:
> > 1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :
> > comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309
> > 2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE)
> > :
> > comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"'
> > tiene estatus 309
> > 3: In dir.create(loc_path) :
> > cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or
> > directory'
> > 4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :
> > cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file
> or
> > directory'
> > 5: In dir.create(paste(loc_path, mapset, sep = "/")) :
> > cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or
> > directory'
> > 6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
> > comando ejecutado 'g.version.exe' tiene estatus 309
> >
> > Any hints? I also attach a screenshot with the message that appears (I
> > cannot copy/paste the text in that message)
> >
> > Thanks much in advance!
> > Vero
> >
> > [0] https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
> >
> > ___
> > grass-stats mailing list
>
> > grass-stats@.osgeo
>
> > https://lists.osgeo.org/mailman/listinfo/grass-stats
> >
> > Rgui_2018-09-13_22-19-45.png (73K)
> > 
> http://osgeo-org.1560.x6.nabble.com/attachment/5378245/0/Rgui_2018-09-13_22-19-45.png
> ;
>
> it's a missing dll.
>
> Are you invoking R from inside the OSGeo4W command console?
>
>
>
> -
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
> ___
> grass-stats mailing list
> grass-stats@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-stats
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Helmut Kudrnovsky
Roger Bivand wrote
> Note that rgrass7 has not been tested on OSGeo4W for many years, so the
> logic differences from Windows may no longer hold. Using Live has often
> been a better choice, but as I never use QGIS, I've no experience. Reports
> on issues with OSGei4W welcome.
> 
> Roger
> 
> Roger Bivand
> Norwegian School of Economics
> Bergen, Norway
> 
> 
> 
> Fra: Helmut Kudrnovsky
> Sendt: søndag 16. september, 16.26
> Emne: Re: [GRASS-stats] Error when starting grass from R (grass
> installedthru osgeo4w)
> Til: 

> grass-stats@.osgeo

> 
> 
> Veronica Andreo wrote > Hello, > > I am preparing a one week GRASS GIS
> course and I mostly expect Windows > users, so I recommend to install from
> OSGeo4W that allows to easily > install > also QGIS, msys (to get nice
> bash tricks) and other libraries that are > then > needed for some grass
> add-ons. > > The last day of the course, I'll show the connection with R.
> Now, starting > R within a grass session works as expected. But I get
> errors when trying > to > initialize GRASS (installed from OSGeo4W) from R
> console. I am following > the instructions in the wiki [0] > > First, I
> had to change the slashes from windows type, to linux type > (because I
> got: > Error: '\O' in an unrecognized escape in character string ""C:\O").
> > > After that, I get the following: > >> initGRASS(gisBase =
> 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase = >
> 'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset
> > = 'user1', SG='elevation') > Error in if (!compatible) { : argumento
> tiene longitud cero > Además: Warning messages: > 1: In
> system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), : >
> comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309 > 2: In
> system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE) > : >
> comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"' >
> tiene estatus 309 > 3: In dir.create(loc_path) : > cannot create dir
> 'NA\nc_spm_08_grass7', reason 'No such file or > directory' > 4: In
> dir.create(paste(loc_path, "PERMANENT", sep = "/")) : > cannot create dir
> 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or > directory' > 5:
> In dir.create(paste(loc_path, mapset, sep = "/")) : > cannot create dir
> 'NA\nc_spm_08_grass7\user1', reason 'No such file or > directory' > 6: In
> system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), : > comando
> ejecutado 'g.version.exe' tiene estatus 309 > > Any hints? I also attach a
> screenshot with the message that appears (I > cannot copy/paste the text
> in that message) > > Thanks much in advance! > Vero > > [0]
> https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R > >
> ___ > grass-stats mailing list
> > grass-stats@.osgeo >
> https://lists.osgeo.org/mailman/listinfo/grass-stats > >
> Rgui_2018-09-13_22-19-45.png (73K) >
> http://osgeo-org.1560.x6.nabble.com/attachment/5378245/0/Rgui_2018-09-13_22-19-45.png;
> it's a missing dll. Are you invoking R from inside the OSGeo4W command
> console? - best regards Helmut -- Sent from:
> http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
> ___ grass-stats mailing list 

> grass-stats@.osgeo

>  https://lists.osgeo.org/mailman/listinfo/grass-stats
> 
> 
> ___
> grass-stats mailing list

> grass-stats@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-stats

Working for years now winGRASS-R only in OSGeo4w, I would call it well
tested.



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Roger Bivand
Note that rgrass7 has not been tested on OSGeo4W for many years, so the logic 
differences from Windows may no longer hold. Using Live has often been a better 
choice, but as I never use QGIS, I've no experience. Reports on issues with 
OSGei4W welcome.

Roger

Roger Bivand
Norwegian School of Economics
Bergen, Norway



Fra: Helmut Kudrnovsky
Sendt: søndag 16. september, 16.26
Emne: Re: [GRASS-stats] Error when starting grass from R (grass installedthru 
osgeo4w)
Til: grass-stats@lists.osgeo.org


Veronica Andreo wrote > Hello, > > I am preparing a one week GRASS GIS course 
and I mostly expect Windows > users, so I recommend to install from OSGeo4W 
that allows to easily > install > also QGIS, msys (to get nice bash tricks) and 
other libraries that are > then > needed for some grass add-ons. > > The last 
day of the course, I'll show the connection with R. Now, starting > R within a 
grass session works as expected. But I get errors when trying > to > initialize 
GRASS (installed from OSGeo4W) from R console. I am following > the 
instructions in the wiki [0] > > First, I had to change the slashes from 
windows type, to linux type > (because I got: > Error: '\O' in an unrecognized 
escape in character string ""C:\O"). > > After that, I get the following: > >> 
initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase = > 
'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset > = 
'user1', SG='elevation') > Error in if (!compatible) { : argumento tiene 
longitud cero > Además: Warning messages: > 1: In system(paste("g.dirseps.exe 
-g", shQuote(Sys.getenv("GISRC"))), : > comando ejecutado 'g.dirseps.exe -g 
"junk"' tiene estatus 309 > 2: In system(paste("g.dirseps.exe -g", 
shQuote(gisDbase)), intern = TRUE) > : > comando ejecutado 'g.dirseps.exe -g 
"C:/Users/RETA/Documents/grassdata"' > tiene estatus 309 > 3: In 
dir.create(loc_path) : > cannot create dir 'NA\nc_spm_08_grass7', reason 'No 
such file or > directory' > 4: In dir.create(paste(loc_path, "PERMANENT", sep = 
"/")) : > cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such 
file or > directory' > 5: In dir.create(paste(loc_path, mapset, sep = "/")) : > 
cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or > 
directory' > 6: In system(paste("g.version", get("addEXE", envir = 
.GRASS_CACHE), : > comando ejecutado 'g.version.exe' tiene estatus 309 > > Any 
hints? I also attach a screenshot with the message that appears (I > cannot 
copy/paste the text in that message) > > Thanks much in advance! > Vero > > [0] 
https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R > > 
___ > grass-stats mailing list > 
grass-stats@.osgeo > https://lists.osgeo.org/mailman/listinfo/grass-stats > > 
Rgui_2018-09-13_22-19-45.png (73K) > 

 it's a missing dll. Are you invoking R from inside the OSGeo4W command 
console? - best regards Helmut -- Sent from: 
http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html 
___ grass-stats mailing list 
grass-stats@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-stats

___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats

Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)

2018-09-16 Thread Helmut Kudrnovsky
Veronica Andreo wrote
> Hello,
> 
> I am preparing a one week GRASS GIS course and I mostly expect Windows
> users, so I recommend to install from OSGeo4W that allows to easily
> install
> also QGIS, msys (to get nice bash tricks) and other libraries that are
> then
> needed for some grass add-ons.
> 
> The last day of the course, I'll show the connection with R. Now, starting
> R within a grass session works as expected. But I get errors when trying
> to
> initialize GRASS (installed from OSGeo4W) from R console. I am following
> the instructions in the wiki [0]
> 
> First, I had to change the slashes from windows type, to linux type
> (because I got:
> Error: '\O' in an unrecognized escape in character string ""C:\O").
> 
> After that, I get the following:
> 
>> initGRASS(gisBase = 'C:/OSGeo4W64/apps/grass/grass-7.4.0', gisDbase =
> 'C:/Users/RETA/Documents/grassdata', location = 'nc_spm_08_grass7', mapset
> = 'user1', SG='elevation')
> Error in if (!compatible) { : argumento tiene longitud cero
> Además: Warning messages:
> 1: In system(paste("g.dirseps.exe -g", shQuote(Sys.getenv("GISRC"))), :
> comando ejecutado 'g.dirseps.exe -g "junk"' tiene estatus 309
> 2: In system(paste("g.dirseps.exe -g", shQuote(gisDbase)), intern = TRUE)
> :
> comando ejecutado 'g.dirseps.exe -g "C:/Users/RETA/Documents/grassdata"'
> tiene estatus 309
> 3: In dir.create(loc_path) :
> cannot create dir 'NA\nc_spm_08_grass7', reason 'No such file or
> directory'
> 4: In dir.create(paste(loc_path, "PERMANENT", sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\PERMANENT', reason 'No such file or
> directory'
> 5: In dir.create(paste(loc_path, mapset, sep = "/")) :
> cannot create dir 'NA\nc_spm_08_grass7\user1', reason 'No such file or
> directory'
> 6: In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
> comando ejecutado 'g.version.exe' tiene estatus 309
> 
> Any hints? I also attach a screenshot with the message that appears (I
> cannot copy/paste the text in that message)
> 
> Thanks much in advance!
> Vero
> 
> [0] https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7#GRASS_within_R
> 
> ___
> grass-stats mailing list

> grass-stats@.osgeo

> https://lists.osgeo.org/mailman/listinfo/grass-stats
> 
> Rgui_2018-09-13_22-19-45.png (73K)
> http://osgeo-org.1560.x6.nabble.com/attachment/5378245/0/Rgui_2018-09-13_22-19-45.png;

it's a missing dll.

Are you invoking R from inside the OSGeo4W command console?



-
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Stats-f4049448.html
___
grass-stats mailing list
grass-stats@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-stats