[GRASS-stats] GRASS-R connection in Windows
Hi Antonio, I've been using WinGRASS for a while but now I would like to run a few functions from R using spgrass (interface between GRASS and R). I know that this is possible and stable in Linux but I'm not sure for Windows. Has anyone tried? Thanks Antonio at the moment there is following for a Grass-R-connection in implemented in WinGrass64 (1) the WinGrass64-installer searches during installation for a installed R and writes - if found - the R-installation-path to %PATH% in the grass64.bat-starting script (see http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/mswindows/GRASS-Installer.nsi#L660) (2) you can start Grass-command-line - it's a windows-command-line, not a msys-rxvt-terminal (you can find this starting option under Programs - Grass64 - Grass command line; but not as a desktop icon) with this starting option you start a Grass-session in the good old text mode. if you type R in the command line, then you start R inside a Grass-session like in Linux. see down: Welcome to GRASS 6.4.0 (2010) GRASS homepage: http://grass.osgeo.org/ This version running thru: Windows Command Shell (cmd.exe) When ready to quit enter:exit Help is available with the command: g.manual -i See the licence terms with: g.version -c Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten. GRASS 6.4.0 (wgs84gc) R R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R ist freie Software und kommt OHNE JEGLICHE GARANTIE. Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten. Tippen Sie 'license()' or 'licence()' für Details dazu. R ist ein Gemeinschaftsprojekt mit vielen Beitragenden. Tippen Sie 'contributors()' für mehr Information und 'citation()', um zu erfahren, wie R oder R packages in Publikationen zitiert werden können. Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder 'help.start()' für eine HTML Browserschnittstelle zur Hilfe. Tippen Sie 'q()', um R zu verlassen. q() Workspace sichern? [y/n/c]: n GRASS 6.4.0 (wgs84gc) what I have in mind (but no time at the moment to improve), see: Ticket #1103 (new enhancement) WinGrass64 - windows-commandline not released Ticket #1149 (new enhancement) WinGrass - load R-installation-path dynamically into PATH with #1103 a Grass-session with wxGui, command-line and R inside a Grass-session would be possible (as already does in WinGrass7) with #1149 Wingrass would recognize also an upgraded R-installation (which does not at the moment) best regards Helmut ___ Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02 smime.p7s Description: S/MIME Cryptographic Signature ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
[GRASS-stats] Re: GRASS-R connection in Windows
Hi Antonio -Ursprüngliche Nachricht- Von: António Rocha Gesendet: 27.09.2010 11:27:43 An: Helmut Kudrnovsky Betreff: Re: GRASS-R connection in Windows Hello Helmut First of all, let me thank you for your reply. de nada Helmut Kudrnovsky wrote: (2) you can start Grass-command-line - it's a windows-command-line, not a msys-rxvt-terminal (you can find this starting option under Programs - Grass64 - Grass command line; but not as a desktop icon) Here I have a question: Is it possible to run a GRASS-Python Script with R-commands just like a normal GRASS-Python Script? (without having to run R in command-line)- I believe it has to do with Ticket #1103 right? Best regards, Antonio Rocha sorry, but I've never used Grass, R and python together. so it's outside of my knowledge. maybe drop this question also at the user- and/or dev-mailing-list. at the moment for WinGrass, the R-installation-path is recognized only once at the WinGrass-installation-procedure and set into the %PATH-variable, so no future upgrade of a R-version will be recognized by the wingrass-installation. the intention of ticket #1103 would be to set the R-installation-path dynamically at every start of a grass-session. best regards Helmut ___ GRATIS: Spider-Man 1-3 sowie 300 weitere Videos! Jetzt kostenlose Movie-FLAT freischalten! http://movieflat.web.de ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] Re: GRASS-R connection in Windows
Hi, I've tried to install spgrass6 in my Windows-R.2.11.1, there seems to be no problem. see down. please contact the r-user-ml for R-related problems. best regards Helmut ___ R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R ist freie Software und kommt OHNE JEGLICHE GARANTIE. Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten. Tippen Sie 'license()' or 'licence()' für Details dazu. R ist ein Gemeinschaftsprojekt mit vielen Beitragenden. Tippen Sie 'contributors()' für mehr Information und 'citation()', um zu erfahren, wie R oder R packages in Publikationen zitiert werden können. Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder 'help.start()' für eine HTML Browserschnittstelle zur Hilfe. Tippen Sie 'q()', um R zu verlassen. chooseCRANmirror() install.packages(spgrass6, dependencies=TRUE) Warnung in install.packages(spgrass6, dependencies = TRUE) : Argument 'lib' fehlt: nutze 'C:\Users\syringia\Documents/R/win-library/2.11' versuche URL 'http://cran.at.r-project.org/bin/windows/contrib/2.11/spgrass6_0.6-20.zip' Content type 'application/zip' length 367628 bytes (359 Kb) URL geöffnet downloaded 359 Kb Paket 'spgrass6' erfolgreich ausgepackt und MD5 Summen abgeglichen Die heruntergeladenen Pakete sind in C:\Users\syringia\AppData\Local\Temp\RtmpzLFz82\downloaded_packages _ - Von: Abdoul Dia Gesendet: 27.09.2010 19:00:00 An: António Rocha Betreff: Re: [GRASS-stats] Re: GRASS-R connection in Windows Hi everyone, I'm wondering if I can ask my question here as I'm not sure to be on the right place?! I'm trying to connect Grass 6.4 with R.2.11 so I can use spgrass6 and GRASS packages under R but I can't get the gmeta() or gmeta6() output. I can't even install spgrass6 on linux. I tried on windows as well as on linux (ubuntu karmic). Is there someone who faced such a problem and how can I solve? Thanks in advance. Abdoul O. Dia 2010/9/27 António Rocha [antonio.ro...@deimos.com.pt] Hello Helmut First of all, let me thank you for your reply. Helmut Kudrnovsky wrote: (2) you can start Grass-command-line - it's a windows-command-line, not a msys-rxvt-terminal (you can find this starting option under Programs - Grass64 - Grass command line; but not as a desktop icon) Here I have a question: Is it possible to run a GRASS-Python Script with R-commands just like a normal GRASS-Python Script? (without having to run R in command-line)- I believe it has to do with Ticket #1103 right? Best regards, Antonio Rocha __ Information from ESET NOD32 Antivirus, version of virus signature database 5482 (20100927) __ The message was checked by ESET NOD32 Antivirus. [http://www.eset.com] ___ grass-stats mailing list [grass-st...@lists.osgeo.org] [http://lists.osgeo.org/mailman/listinfo/grass-stats] -- Abdoul Ousmane DIA ___ GRATIS: Spider-Man 1-3 sowie 300 weitere Videos! Jetzt kostenlose Movie-FLAT freischalten! http://movieflat.web.de ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
[GRASS-stats] [GRASS-user] WinGRASS 7-R-integration
hi, in WinGRASS 7 (standalone installer: http://grass.osgeo.org/download/software.php#g70x) the Windows batchfiles for use with R (http://code.google.com/p/batchfiles/) are now integrated for a smooth GRASS-R-coupling in windows. see also trac.osgeo.org/grass/ticket/1149 and for the usage see http://grass.osgeo.org/wiki/R_statistics#Usage_III - best regards Helmut -- View this message in context: http://osgeo-org.1560.n6.nabble.com/GRASS-user-WinGRASS-7-R-integration-tp4999160.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] Using GRASS addons in R on Windows
>Wrong target, please use: >http://win-builder.r-project.org/s90s00N7rhyt/rgrass7_0.1-4.zip > utils:::menuInstallLocal() Paket ‘rgrass7’ erfolgreich ausgepackt und MD5 Summen abgeglichen GRASS version: 7.1.svn GRASS SVN revision: 67543 Build date: 2016-01-11 Build platform: x86_64-w64-mingw32 GDAL: 1.11.3 PROJ.4: 4.9.2 GEOS: 3.5.0 SQLite: 3.7.17 Python: 2.7.5 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 > library(rgrass7) Loading required package: sp Loading required package: XML GRASS GIS interface loaded with GRASS version: GRASS 7.1.svn (2016) and location: nc_spm_08_grass7 -- binary addon (r.stream.order) > execGRASS("r.watershed", elevation="elevation", threshold=1, > accumulatio$ SECTION 1a (of 5): Initiating Memory. SECTION 1b (of 5): Determining Offmap Flow. 100% SECTION 2: A* Search. 100% SECTION 3a: Accumulating Surface Flow with MFD. 100% SECTION 3b: Adjusting drainage directions. 100% SECTION 4: Watershed determination. 100% SECTION 5: Closing Maps. 100% > > execGRASS("r.stream.order", stream_rast="mystreams", > direction="myflowdir", $ All in RAM calculation... Reading raster map ... 100% Reading raster map ... 100% Finding nodes... Calculating Strahler's stream order... Writing output raster maps... -- python addon (r.roughness.vector): > execGRASS("r.slope.aspect", elevation="elevation", slope="myslope", > aspect="$ 100% Aspect raster map complete Slope raster map complete > execGRASS("r.roughness.vector", elevation="elevation", slope="myslope", > aspe$ Error in system(cmd0, intern = TRUE) : 'r.roughness.vector.exe' not found Error in parseGRASS(cmd, legacyExec = legacyExec) : r.roughness.vector not found -- python GRASS script (r.reclass.area): > execGRASS("r.reclass.area", input="zipcodes", > output="zipcode_larger2000ha",$ Error in system(cmd0, intern = TRUE) : 'r.reclass.area.exe' not found Error in parseGRASS(cmd, legacyExec = legacyExec) : r.reclass.area not found -- it seems to be the same behaviour: binary addons (exe living in e.g. C:\Users\xy\AppData\Roaming\GRASS7\addons\bin) are found. python scripts (with related bat-files in e.g. C:\Users\xy\AppData\Roaming\GRASS7\addons\bin or in e.g. C:\Program Files\GRASS GIS 7.1.svn\bin) are not found as it is searched for e.g. r.reclass.area.exe (see above). - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244654.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] Using GRASS addons in R on Windows
>OK. Please check that r.roughness.vector.bat is present in: > >C:\Users\xy\AppData\Roaming\GRASS7\addons\bin, or >C:\Program Files\GRASS GIS 7.1.svn\bin it is in the addon path: C:\Users\xxx\AppData\Roaming\GRASS7\addons\bin it works in winGRASS itself. r.roughness.vector elevation=elevation@PERMANENT slope=slope@rtestw64bit aspect=aspect@rtestw64bit Check if input files exist ... Define default output names when not defined by user ... Calculate compass aspect values ... Calculate colatitude ... Calculate direction cosines ... Calculate sum of direction cosines ... Calculating sum of X direction cosines ... Calculating sum of Y direction cosines ... Calculating sum of Z direction cosines ... Calculate vector strength ... Calculate inverted Fisher's K parameter ... Result maps: elevation_vector_strength_3x3 elevation_fisher_1K_3x3 Calculations done. (Tue Jan 12 10:41:00 2016) Command finished (1 min 18 sec) xml1.R "WN_bat <- sub(".bat", "", list.files(paste(Sys.getenv("GISBASE"), "bin", sep="/"), pattern=".bat$")) if (nchar(Sys.getenv("GRASS_ADDON_BASE")) > 0) { t0 <- try(sub(".bat", "", list.files(paste(Sys.getenv("GRASS_ADDON_BASE"), "bin", sep="/"), pattern=".bat$")), silent=TRUE) if (class(t0) != "try-error" && is.character(t0) && nchar(t0) > 0) WN_bat <- c(WN_bat, t0) assign("WN_bat", WN_bat, envir=.GRASS_CACHE) }" do it manually: WN_bat <- sub(".bat", "", list.files(paste(Sys.getenv("GISBASE"), "bin", sep="/"), pattern=".bat$")) > WN_bat [1] "d.correlate" "d.frame" "d.out.file" [4] "d.polar" "d.rast.edit" "d.rast.leg" [7] "d.redraw" "d.shade" "d.to.rast" [10] "d.what.rast" "d.what.vect" "db.dropcolumn" [13] "db.droptable" "db.in.ogr""db.out.ogr" [16] "db.test" "db.univar""g.extension.all" [19] "g.extension" "g.gui.animation" "g.gui.datacatalog" [22] "g.gui.dbmgr" "g.gui.gcp""g.gui.gmodeler" [25] "g.gui.iclass" "g.gui.mapswipe" "g.gui.psmap" [28] "g.gui.rlisetup" "g.gui.timeline" "g.gui.tplot" [31] "g.gui.vdigit" "g.manual" "g.search.modules" [34] "i.colors.enhance" "i.image.mosaic" "i.in.spotvgt" [37] "i.oif""i.pansharpen" "i.spectral" [40] "i.tasscap""m.proj" "r.blend" [43] "r.buffer.lowmem" "r.colors.stddev" "r.fillnulls" [46] "r.grow" "r.import" "r.in.aster" [49] "r.in.srtm""r.in.wms" "r.mask" [52] "r.out.xyz""r.pack" "r.plane" [55] "r.reclass.area" "r.rgb""r.shade" [58] "r.tileset""r.unpack" "r3.in.xyz" [61] "t.create" "t.info" "t.list" [64] "t.merge" "t.rast.accdetect" "t.rast.accumulate" [67] "t.rast.aggregate" "t.rast.aggregate.ds" "t.rast.algebra" [70] "t.rast.colors""t.rast.contour" "t.rast.export" [73] "t.rast.extract" "t.rast.gapfill" "t.rast.import" [76] "t.rast.list" "t.rast.mapcalc" "t.rast.neighbors" [79] "t.rast.out.vtk" "t.rast.series""t.rast.to.rast3" [82] "t.rast.to.vect" "t.rast.univar""t.rast.what" [85] "t.rast3d.algebra" "t.rast3d.extract" "t.rast3d.list" [88] "t.rast3d.mapcalc" "t.rast3d.univar" "t.register" [91] "t.remove" "t.rename" "t.sample" [94] "t.select" "t.shift" "t.snap" [97] "t.support""t.topology" "t.unregister" [100] "t.vect.algebra" "t.vect.db.select" "t.vect.export" [103] "t.vect.extract" "t.vect.import""t.vect.list" [106] "t.vect.observe.strds" "t.vect.univar""t.vect.what.strds" [109] "v.build.all" "v.centroids" "v.db.addcolumn" [112] "v.db.addtable""v.db.dropcolumn" "v.db.droprow" [115] "v.db.droptable" "v.db.join""v.db.reconnect.all" [118] "v.db.renamecolumn""v.db.univar" "v.db.update" [121] "v.dissolve" "v.import" "v.in.e00" [124] "v.in.geonames""v.in.lines" "v.in.mapgen" [127] "v.in.wfs" "v.krige" "v.pack" [130] "v.rast.stats" "v.report" "v.to.lines" [133] "v.unpack" "v.what.strds" "v.what.vect" [136] "wxpyimgview" t0 <- sub(".bat", "", list.files(paste(Sys.getenv("GRASS_ADDON_BASE"), "bin", sep="/"), pattern=".bat$")) > t0 [1] "m.ecad""r.basin" "r.biodiversity" [4] "r.euroeco" "r.hypso" "r.roughness.vector" [7]
Re: [GRASS-stats] Using GRASS addons in R on Windows
> >Is %APPDATA% a predictable location on Windows? yes, %APPDATA% is predictable on Windows. we set it e.g. in the winGRASS standalone installer here: https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows/GRASS-Installer.nsi.tmpl#L743 and on other places in the code. >Where should I look to see where the correct values are stored on Unix >(Linux and OSX?) and Windows? I see: GRASS_ADDON_BASE as GNU/Linux is >$HOME/.grass7/addons, on MS Windows $APPDATA\GRASS7\addons in: > >https://grass.osgeo.org/grass70/manuals/variables.html maybe some hints: https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/scripts/g.extension/g.extension.py#L1053 - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244927.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] Using GRASS addons in R on Windows
>Thanks. I've committed changes to R-forge, which seem to work for me for >Linux and Windows. The updated draft Windows binary is at: > >http://win-builder.r-project.org/KJJJkeazt7Sw/rgrass7_0.1-5.zip > utils:::menuInstallLocal() Paket ‘rgrass7’ erfolgreich ausgepackt und MD5 Summen abgeglichen > > library(rgrass7) Lade nötiges Paket: sp Lade nötiges Paket: XML GRASS GIS interface loaded with GRASS version: (GRASS not running) from the https://cran.r-project.org/web/packages/rgrass7/rgrass7.pdf Examples ## Not run: initGRASS("/usr/bin/grass-7.0.0", home=tempdir()) initGRASS("C:/GRASS", home=tempdir()) ## End(Not run) as an used windows user I've tried first with Windows-typical backslash ;-) initGRASS("C:\\Program Files\\GRASS GIS 7.1.svn", home=tempdir(), gisDbase="C:\\grassdata", location="nc_spm_08", mapset="user1") > initGRASS("C:\Program Files\GRASS GIS 7.1.svn", home=tempdir(), > location="C:\grassdata\nc_spm_08\", mapset="user1") Fehler: '\P' ist eine unbekannte Escape-Sequenz in der Zeichenkette beginnend mit ""C:\P" error: '\P' is an unkown escape sequence beginning with with ""C:\P" then I tried double backslash initGRASS("C:\\Program Files\\GRASS GIS 7.1.svn", home=tempdir(), gisDbase="C:\\grassdata", location="nc_spm_08", mapset="user1") > initGRASS("C:\\Program Files\\GRASS GIS 7.1.svn", home=tempdir(), > gisDbase="C:\\grassdata", location="nc_spm_08", mapset="user1") gisdbaseC:/grassdata locationnc_spm_08 mapset user1 rows6 columns 8 north 222800 south 222740 west642590 east642670 nsres 10 ewres 10 projection +proj=lcc +lat_1=36.16 +lat_2=34.34 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1 and the slash mentioned in the manual example initGRASS("C:/Program Files/GRASS GIS 7.1.svn", home=tempdir(), gisDbase="C:/grassdata", location="nc_spm_08", mapset="user1") > initGRASS("C:/Program Files/GRASS GIS 7.1.svn", home=tempdir(), > gisDbase="C:/grassdata", location="nc_spm_08", mapset="user1") gisdbaseC:/grassdata locationnc_spm_08 mapset user1 rows6 columns 8 north 222800 south 222740 west642590 east642670 nsres 10 ewres 10 projection +proj=lcc +lat_1=36.16 +lat_2=34.34 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1 not sure what R's normal notation of MS windows paths are (slash or double backslash), maybe an addition to the manual would be worth? will testing winGRASS modules and addons later. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5244980.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] Using GRASS addons in R on Windows
>> library(rgrass7) >> initGRASS("/usr/local/grass7", home=tempdir()) >sh: 1: g.gisenv: not found >sh: 1: g.gisenv: not found >sh: 1: g.gisenv: not found >sh: 1: g.gisenv: not found >sh: 1: g.gisenv: not found >sh: 1: g.version: not found >Error in system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), : > error in running command just a quick test on windows here: > library(rgrass7) Lade nötiges Paket: sp Lade nötiges Paket: XML GRASS GIS interface loaded with GRASS version: (GRASS not running) > initGRASS("C:/Program Files/GRASS GIS 7.1.svn", home=tempdir()) gisdbaseC:/Users/x~1/AppData/Local/Temp/Rtmpk93Gnb locationfile55c44229c0 mapset file55c5711580b rows1 columns 1 north 1 south 0 west0 east1 nsres 1 ewres 1 projection NA is your GRASS really living in /usr/local/grass7 ? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Using-GRASS-addons-in-R-on-Windows-tp5244411p5245064.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] initGRASS() never stops running?
>I am using Rstudio within GRASS without problems (on Ubuntu 14.04). No specific configuration required as >far as I remember. Also on Windows I generally have no problem running Rstudio under GRASS (the latter >installed using OSGeo4W), but there I had to define the path to Rstudio (https://pvanb.wordpress.com >/2014/12/17/access-r-from-grass-gis-on-windows/) it shouldn't be needed anymore; some time ago I've added the path to R studio to OSGeo4W- and standalone winGRASS 7, see: https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows/env.bat#L18 https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows/osgeo4w/env.bat.tmpl#L18 - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/initGRASS-never-stops-running-tp5249279p5250356.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
Anna Petrášová wrote > On Thu, Jul 14, 2016 at 9:20 PM, Helmut Kudrnovsky > hellik@ > wrote: >>>When I enter the command echo %PATH% I get: >>>[...] >>>Dnvm\;C:\Program Files >> (x86)\Skype\Phone\;c:\users\buer3379\appdata\local\enthought\canopy\user\scripts;C:\Users\buer3379\AppData\Local\Enthough\Canopy\User;C:\Users\buer3379\AppData\Local\Enthought\Canopy\User\Scripts;C:\Program >> Files\RStudio\bin;C:\Program Files\R\R-3.3.1\bin\x64 >> >> ok, R is in %PATH% >> >> the script works here on my win 10 machine out of the box. >> >> have you installed all the R packages needed by the GRASS addon? >> >> >> > > When you launch Rscript from GRASS terminal (the black one) what do you > get? Cleaning up temporary files... Starting GRASS GIS... WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows nicht möglich. __ ___ _____ / / __ \/ | / ___/ ___/ / / _/ ___/ / / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \ / /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ / \/_/ |_/_/ |_/// \/___/// Welcome to GRASS GIS 7.3.svn (r68855) GRASS GIS homepage: http://grass.osgeo.org This version running through:Command Shell (C:\Windows\system32\cmd.exe) Help is available with the command: g.manual -i See the licence terms with: g.version -c See citation options with: g.version -x If required, restart the GUI with: g.gui wxpython When ready to quit enter:exit Launching GUI in the background, please wait... Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\hkmyr>Rscript Usage: /path/to/Rscript [--options] [-e expr [-e expr2 ...] | file] [args] --options accepted are --help Print usage and exit --version Print version and exit --verbose Print information on progress --default-packages=list Where 'list' is a comma-separated set of package names, or 'NULL' or options to R, in addition to --slave --no-restore, such as --save Do save workspace at the end of the session --no-environDon't read the site and user environment files --no-site-file Don't read the site-wide Rprofile --no-init-file Don't read the user R profile --restore Do restore previously saved objects at startup --vanilla Combine --no-save, --no-restore, --no-site-file --no-init-file and --no-environ 'file' may contain spaces but not shell metacharacters Expressions (one or more '-e ') may be used *instead* of 'file' See also ?Rscript from within R - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/R-3-3-1-and-GRASSGIS-7-0-4-tp527p5276459.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
>and start a normal windows console, just the one which is delivered by windows itself and type RScript > >here on my side: > >Microsoft Windows [Version 10.0.10586] >(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten. > >C:\Users\>cd C:\Program Files\R\R-3.3.1\bin of course, first change to the R installation folder, see above - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/R-3-3-1-and-GRASSGIS-7-0-4-tp527p5276461.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
>In order for GRASS to be able to find R executables, R must be on the >PATH variable. in the standalone winGRASS installer R is already in the %PATH% variable, so no extra work is needed. I hope I'll find some time to implement this also in OSGeo4W-winGRASS. see in original report above, R is in %PATH% as R starts in the winGRASS windows console. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/R-3-3-1-and-GRASSGIS-7-0-4-tp527p5275489.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
Anna Petrášová wrote > Hi, > > In order for GRASS to be able to find R executables, R must be on the > PATH variable. Follow for example this solution: > > https://pvanb.wordpress.com/2014/12/17/access-r-from-grass-gis-on-windows/ > > to make R accessible from GRASS permanently. A simple but temporary > solution is to open GRASS GIS and paste the path to R in the black > terminal: > > set PATH=%PATH%;C:\Program Files\R\R-3.3.1\bin > > but this has to be repeated after restarting GRASS session. > > Anna > > > > On Fri, Jul 1, 2016 at 4:19 PM, C. Buerger IV > cbuerger4@ > wrote: >> I'm attempting to use the FUTURES model for GRASSGIS, which requires an >> interface with R to use the drudge function. I'm running Windows 7 and >> the >> automatic linkup between R and GRASS does not seem to be happening. When >> working from the FUTURES package >> I have run: >> >> r.futures.potential -d input=sampling@practice1 output=potential.csv >> columns=devpressure_0_5_92,slope,road_dens_perc,forest_1992_smooth_perc,dist_to_water_km,dist_to_protected_km,dist_interchanges_km,travel_time_cities >> developed_column=urban_change_clip subregions_column=counties >> min_variables=4 --overwrite >> >> and get: >> >> Running automatic model selection ... >> Traceback (most recent call last): >> File "C:\Users\buer3379\AppData\Roaming\GRASS7\addons/scri >> pts/r.futures.potential.py", line 185, in > >> sys.exit(main()) >> File "C:\Users\buer3379\AppData\Roaming\GRASS7\addons/scri >> pts/r.futures.potential.py", line 158, in main >> stdout=subprocess.PIPE, stderr=subprocess.PIPE) >> File "C:\OSGEO4~1\apps\Python27\lib\subprocess.py", line >> 711, in __init__ >> errread, errwrite) >> File "C:\OSGEO4~1\apps\Python27\lib\subprocess.py", line >> 948, in _execute_child >> startupinfo) >> WindowsError: [Error 2] The system cannot find the file >> specified >> >> In just attempting to run R via R--save I get: >> >> R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" >> Copyright (C) 2016 The R Foundation for Statistical Computing >> Platform: x86_64-w64-mingw32/x64 (64-bit) >> R is free software and comes with ABSOLUTELY NO WARRANTY. >> You are welcome to redistribute it under certain conditions. >> Type 'license()' or 'licence()' for distribution details. >> Natural language support but running in an English locale >> R is a collaborative project with many contributors. >> Type 'contributors()' for more information and >> 'citation()' on how to cite R or R packages in publications. >> Type 'demo()' for some demos, 'help()' for on-line help, or >> 'help.start()' for an HTML browser interface to help. >> Type 'q()' to quit R. >> During startup - Warning messages: >> 1: Setting LC_CTYPE=en_US.cp1252 failed >> 2: Setting LC_COLLATE=en_US.cp1252 failed >> 3: Setting LC_TIME=en_US.cp1252 failed >> 4: Setting LC_MONETARY=en_US.cp1252 failed >>> >> >> Does anyone have any pointers or tips to work around this problem. Any >> ideas would be appreicated. just tested it now with standalone-winGRASS System Info GRASS Version: 7.3.svn GRASS SVN revision: r68855 Build date: 2016-07-06 Build platform: x86_64-w64-mingw32 GDAL: 2.0.2 PROJ.4: 4.9.2 GEOS: 3.5.0 SQLite: 3.7.17 Python: 2.7.5 wxPython: 2.8.12.1 Platform: Windows-8-6.2.9200 - without any change to %PATH% - with the example from [1] (n.b. not exactly because too lazy and to tired to follow all the exercises late at night) r.futures.potential -d input=sampling output=potential.csv columns=devpressure_0_5_92,slope,road_dens_perc,forest_1992_smooth_perc,dist_to_water_km,dist_to_protected_km,dist_interchanges_km,travel_time_cities developed_column=urban_change_clip subregions_column=counties min_variables=4 Running automatic model selection ... Best model summary: - Beim Start - Warnmeldungen: 1: Setting LC_CTYPE=de_AT.cp1252 failed 2: Setting LC_COLLATE=de_AT.cp1252 failed 3: Setting LC_TIME=de_AT.cp1252 failed 4: Setting LC_MONETARY=de_AT.cp1252 failed Fixed term is "(Intercept)" Es gab 16 Warnungen (Anzeige mit warnings()) Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) [glmerMod] Family: binomial ( logit ) Formula: urban_change_clip ~
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
C. Buerger IV wrote > I'm attempting to use the FUTURES > https://grasswiki.osgeo.org/wiki/Workshop_on_urban_growth_modeling_with_FUTURES#Softwaremodel > for GRASSGIS, which requires an interface with R to use the drudge > function. I'm running Windows 7 and the automatic linkup between R and > GRASS does not seem to be happening. When working from the FUTURES package > I have run: > > r.futures.potential -d input=sampling@practice1 output=potential.csv > columns=devpressure_0_5_92,slope,road_dens_perc,forest_1992_smooth_perc,dist_to_water_km,dist_to_protected_km,dist_interchanges_km,travel_time_cities > developed_column=urban_change_clip subregions_column=counties > min_variables=4 --overwrite > > and get: > > Running automatic model selection ... > Traceback (most recent call last): > File "C:\Users\buer3379\AppData\Roaming\GRASS7\addons/scri > pts/r.futures.potential.py", line 185, in > > sys.exit(main()) > File "C:\Users\buer3379\AppData\Roaming\GRASS7\addons/scri > pts/r.futures.potential.py", line 158, in main > stdout=subprocess.PIPE, stderr=subprocess.PIPE) > File "C:\OSGEO4~1\apps\Python27\lib\subprocess.py", line > 711, in __init__ > errread, errwrite) > File "C:\OSGEO4~1\apps\Python27\lib\subprocess.py", line > 948, in _execute_child > startupinfo) > WindowsError: [Error 2] The system cannot find the file > specified > > In just attempting to run R via R--save I get: > > R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" > Copyright (C) 2016 The R Foundation for Statistical Computing > Platform: x86_64-w64-mingw32/x64 (64-bit) > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > Natural language support but running in an English locale > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > During startup - Warning messages: > 1: Setting LC_CTYPE=en_US.cp1252 failed > 2: Setting LC_COLLATE=en_US.cp1252 failed > 3: Setting LC_TIME=en_US.cp1252 failed > 4: Setting LC_MONETARY=en_US.cp1252 failed >> > > Does anyone have any pointers or tips to work around this problem. Any > ideas would be appreicated. > > C. L. Buerger IV could you type in the winGRASS windows console: echo %PATH% ? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/R-3-3-1-and-GRASSGIS-7-0-4-tp527p5275499.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R 3.3.1 and GRASSGIS 7.0.4
[please keep it on the ML] >A Standalone install. At the time it seemed like what I wanted. tested here: System Info GRASS Version: 7.3.svn GRASS SVN revision: r68855 Build date: 2016-07-06 Build platform: x86_64-w64-mingw32 GDAL: 2.0.2 PROJ.4: 4.9.2 GEOS: 3.5.0 SQLite: 3.7.17 Python: 2.7.5 wxPython: 2.8.12.1 Platform: Windows-8-6.2.9200 typing R in the console: Cleaning up temporary files... Starting GRASS GIS... WARNUNG: Sperren gleichzeitiger Zugriffe auf ein Mapset ist unter Windows nicht möglich. __ ___ _____ / / __ \/ | / ___/ ___/ / / _/ ___/ / / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \ / /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ / \/_/ |_/_/ |_/// \/___/// Welcome to GRASS GIS 7.3.svn (r68855) GRASS GIS homepage: http://grass.osgeo.org This version running through:Command Shell (C:\Windows\system32\cmd.exe) Help is available with the command: g.manual -i See the licence terms with: g.version -c See citation options with: g.version -x If required, restart the GUI with: g.gui wxpython When ready to quit enter:exit Launching GUI in the background, please wait... Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) >I'm running Windows 7 and the automatic linkup between R and GRASS does not seem to be happening. in the standalone R is in the %PATH% variable, so more investigation in the r.future-script is needed. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/R-3-3-1-and-GRASSGIS-7-0-4-tp527p5275488.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 is not loading
>Using Windows 7 Enterprise and R 3.3.0 and R 3.3.1, GRASS 7.0.4, and rgrass7 0.1-7 and 0.1-8, I see no >issues and cannot reproduce it. Could other users of Windows (I am not a Windows user) please report >whether this loading error is specific to the OP (and another person who contacted me offlist). Do not >write to me offlist, only the list collectively is likely to resolve this. [snip] > Error : .onAttach in attachNamespace() f├╝r 'rgrass7' fehlgeschlagen, > Details: > Aufruf: if (class(t0) != "try-error" && is.character(t0) && nchar(t0) > > Fehler: Fehlender Wert, wo TRUE/FALSE n├Âtig ist looking at the error, it seems to come from: https://r-forge.r-project.org/scm/viewvc.php/pkg/rgrass7/R/xml1.R?view=markup=spgrass [...] if (nchar(Sys.getenv("GRASS_ADDON_BASE")) > 0) { t0 <- try(sub(".bat", "", list.files(paste(Sys.getenv("GRASS_ADDON_BASE"), "bin", sep="/"), pattern=".bat$")), silent=TRUE) if (class(t0) != "try-error" && is.character(t0) && nchar(t0) > 0) WN_bat <- c(WN_bat, t0) [...] could it be that (some) addons raises this issue? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/rgrass7-is-not-loading-tp5286725p5289275.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 is not loading
[you have to be subscribed to post in this ML] benhemingway wrote > I am having the same problem. > > Windows 10 Home 64 bit. Native GRASS 7.0.4 R 3.3.1 > > When I try to load the rgrass7 library from within GRASS i get: > > Error : .onAttach failed in attachNamespace() for 'rgrass7', details: > call: if (class(t0) != "try-error" && is.character(t0) && nchar(t0) > > error: missing value where TRUE/FALSE needed > Error: package or namespace load failed for 'rgrass7' > > When I try and load it from within R i get: > > Loading required package: sp > Loading required package: XML > GRASS GIS interface loaded with GRASS version: (GRASS not running) > > -Ben after starting R in winGRASS and before library("rgrass7") , could you do: sessionInfo() have you installed any GRASS addons? if yes, which one? the addons are installed in C:\Users\yourusername\AppData\Roaming\GRASS7 if you have installed some GRASS addons, could you delete the addons folder in the C:\Users\yourusername\AppData\Roaming\GRASS7 then restart winGRASS (without any addons installed) and R and try to do library("rgrass7") again and report the results. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/rgrass7-is-not-loading-tp5286725p5289278.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS GIS 7.0 (stable) and R integration issue
>I've put a Windows binary and source of rgrass7_0.1-9 on: > >http://spatial.nhh.no/R/rgrass7/ > >which I believe resolves the issue. Please test and report back (on list, >subscribe first, then reply or post). Please also check with addons >present to be sure that the fix works both with and without addons. tested here with: System Info GRASS Version: 7.3.svn GRASS SVN revision: r69683 Build date: 2016-10-07 Build platform: x86_64-w64-mingw32 GDAL: 2.1.1 PROJ.4: 4.9.3 GEOS: 3.5.0 SQLite: 3.14.1 Python: 2.7.5 wxPython: 2.8.12.1 Platform: Windows-8-6.2.9200 (OSGeo4W) - with addons: C:\>set PATH=%PATH%;"C:\Program Files\R\R-3.3.1\bin\x64" C:\>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" [...] > library("rgrass7") Lade n├Âtiges Paket: sp Lade n├Âtiges Paket: XML GRASS GIS interface loaded with GRASS version: GRASS 7.3.svn (2016) and location: nc_spm_08_grass7 [...] > sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgrass7_0.1-9 XML_3.98-1.4 sp_1.2-3 loaded via a namespace (and not attached): [1] grid_3.3.1 lattice_0.20-34 [...] > parseGRASS("r.flip") Command: r.flip Extension: .exe Description: Flips an image. Keywords: Flips an image. Parameters: name: input, type: string, required: yes, multiple: no keydesc: name, keydesc_count: 1 [Name der Eingabe-Rasterkarte] name: output, type: string, required: yes, multiple: no keydesc: name, keydesc_count: 1 [Name der Ausgabe-Rasterkarte] Flags: name: w [East-West flip] {FALSE} name: b [Both N-S and E-W flip] {FALSE} name: overwrite [Ausgabedateien d├╝rfen bereits existierende Dateien ├╝berschreiben.] {FALSE} name: help [Print usage summary] {FALSE} name: verbose [Ausf├╝hrlicher Ausgabemodus] {FALSE} name: quiet [Schweigsamer Ausgabemodus] {FALSE} [...] > parseGRASS("r.northerness.easterness") Command: r.northerness.easterness Extension: .bat Description: Calculation of northerness, easterness and the interaction between northerness and slope Keywords: Raster, Gel├ñnde, aspect, slope, sun Parameters: name: elevation, type: string, required: yes, multiple: no keydesc: name, keydesc_count: 1 [Name of elevation raster map] Flags: name: help [Print usage summary] {FALSE} name: verbose [Ausf├╝hrlicher Ausgabemodus] {FALSE} name: quiet [Schweigsamer Ausgabemodus] {FALSE} - without addons: C:\>set PATH=%PATH%;"C:\Program Files\R\R-3.3.1\bin\x64" C:\>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" [...] > library("rgrass7") Lade n├Âtiges Paket: sp Lade n├Âtiges Paket: XML GRASS GIS interface loaded with GRASS version: GRASS 7.3.svn (2016) and location: nc_spm_08_grass7 [...] > sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgrass7_0.1-9 XML_3.98-1.4 sp_1.2-3 loaded via a namespace (and not attached): [1] grid_3.3.1 lattice_0.20-34 [...] > parseGRASS("r.region") Command: r.region Extension: .exe Description: Setzt die Begrenzungs-Definition (boundary) f├╝r eine Rasterkarte. Keywords: Raster, Metadaten Parameters: name: map, type: string, required: yes, multiple: no keydesc: name, keydesc_count: 1 [Name of raster map to change] name: region, type: string, required: no, multiple: no keydesc: name, keydesc_count: 1 [Setze Region von benannter Region.] name: raster, type: string, required: no, multiple: no keydesc: name, keydesc_count: 1 [Setze Region angepasst an diese Rasterkarte.] name: vector, type: string, required: no, multiple: no keydesc: name, keydesc_count: 1 [Setze Region angepasst an diese Vektorkarte.] name: n, type: string, required: no, multiple: no keydesc: value, keydesc_count: 1 [Wert f├╝r die n├Ârdliche Grenze.] name: s, type: string, required: no, multiple: no keydesc: value, keydesc_count: 1 [Wert f├╝r die s├╝dliche Grenze.] name: e, type: string, required: no, multiple: no keydesc: value,
Re: [GRASS-stats] rgrass7 is not loading
>The OP replied off-list 20/9 that: > >"I'm working on win7 home professional. > >It's the latest r version (3.3.0) and native grass 7.0.4. > >The rgrass7 package is the latest, downloaded yesterday. In the single r session it works and reports that grass is not running. > >But if i start it in the grass session i get this error. > >It seems that there are any old grass r bindings which uses the namespaces needed from the package. > >Until yesterday it worked fine... > >I searched for this issue, founded similar reports, but no solutions. Am" > >Using Windows 7 Enterprise and R 3.3.0 and R 3.3.1, GRASS 7.0.4, and rgrass7 0.1-7 and 0.1-8, I see no issues and cannot reproduce it. Could other users of Windows (I am not a Windows user) please report whether this loading error is specific to the OP (and another person who contacted me offlist). Do not write to me offlist, only the list collectively is likely to resolve this. tested here on a win 10 64-bit box, and osgeo4w-winGRASS7.0.5; following steps for testing: - start a osgeo4w-winGRASS7.0.5-session - adding R to %PATH%: C:\>set PATH=%PATH%;"C:\Program Files\R\R-3.3.1\bin" C:\>echo %PATH% C:\OSGEO4~1\apps\grass\grass-7.0.5\lib;C:\OSGEO4~1\apps\grass\grass-7.0.5\bin;C:\Users\hkmyr\AppData\Roaming\GRASS7\addons\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\WBem;C:\OSGEO4~1\apps\msys\bin;"C:\Program Files\R\R-3.3.1\bin" - following library versions are installed: install.packages("sp") # sp_1.2-3 install.packages("rgdal") # rgdal_1.1-10 install.packages("rgrass7") # rgrass7_0.1-8 - then typing R in the osgeo4w-windows console: C:\>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R ist freie Software und kommt OHNE JEGLICHE GARANTIE. Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten. Tippen Sie 'license()' or 'licence()' f├╝r Details dazu. R ist ein Gemeinschaftsprojekt mit vielen Beitragenden. Tippen Sie 'contributors()' f├╝r mehr Information und 'citation()', um zu erfahren, wie R oder R packages in Publikationen zitiert werden k├Ânnen. Tippen Sie 'demo()' f├╝r einige Demos, 'help()' f├╝r on-line Hilfe, oder 'help.start()' f├╝r eine HTML Browserschnittstelle zur Hilfe. Tippen Sie 'q()', um R zu verlassen. Beim Start - Warnmeldungen: 1: Setting LC_CTYPE=de_AT.cp1252 failed 2: Setting LC_COLLATE=de_AT.cp1252 failed 3: Setting LC_TIME=de_AT.cp1252 failed 4: Setting LC_MONETARY=de_AT.cp1252 failed > - and loading rgrass7: > library("rgrass7") Lade n├Âtiges Paket: sp Lade n├Âtiges Paket: XML GRASS GIS interface loaded with GRASS version: GRASS 7.0.5 (2016) and location: nc_spm_08_grass7 beside some locale setting issues, library("rgrass7") works here on my side. I've tested it on a few 32bit/64bit win7/win8/win10-boxes, no issues so far here in testing on my side. taken from the mentioned error report: > Error : .onAttach in attachNamespace() f├╝r 'rgrass7' fehlgeschlagen, > Details: > Aufruf: if (class(t0) != "try-error" && is.character(t0) && nchar(t0) > > Fehler: Fehlender Wert, wo TRUE/FALSE n├Âtig ist what can be the reason of such an attachNamespace() issue? two installed rgrass7 packages (with and without admin rights)? locale issue? path issue? anything else to test? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/rgrass7-is-not-loading-tp5286725p5289107.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 is not loading
Helmut Kudrnovsky wrote > what can be the reason of such an attachNamespace() issue? > > two installed rgrass7 packages (with and without admin rights)? > locale issue? > path issue? > > anything else to test? maybe .Rprofile file that is loading it already at Startup? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/rgrass7-is-not-loading-tp5286725p5289111.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
> >With the fix, R for Windows picks up the default personal library location. >> This is both with Rgui started in the GRASS Layer Manager console, and in >> the Windows GRASS terminal. > > >> Thanks very much! >Excellent, thanks for the rapid test! Hence I'll backport the fix. thanks for testing and backporting. locally already working, I hope to find some time soon to implement that the R-GRASS coupling in OSGEO4W-winGRASS works the same as in standalone winGRASS. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5297335.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > if we let %HOME% untouched, the easiest way may be > (similar as we already do it with Rstudio: > IF EXIST "%ProgramFiles%\RStudio\bin\rstudio.exe" set > PATH=%PATH%;%ProgramFiles%\RStudio\bin) > > - check if there is C:\Users\yourusername\Documents\R > - if yes, set R_USER=C:\Users\hkmyr\Documents > > so the most common cases of private R libraries should be covered. > > any comments/objections for this change? after some testing on win7, win8, win10, I've committed: https://lists.osgeo.org/pipermail/grass-commit/2016-November/040769.html New Revision: 69883 Modified: grass/trunk/mswindows/env.bat Log: set R_USER if %USERPROFILE%\Documents\R\ exists to catch most common cases of private R libraries in windows it should catch at least the common cases where personal libraries are located in %USERPROFILE%\Documents\R\ please test the next standalone winGRASS7.3.svn daily builds (https://wingrass.fsv.cvut.cz/grass73/x86_64/ or https://wingrass.fsv.cvut.cz/grass73/x86/). if it works, it should be backported to the standalone winGRASS7.0.x and the upcoming winGRASS7.2. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5297203.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > > Helmut Kudrnovsky wrote >> both changes should be discussed on the dev ML. >> >> before such changes are implemented, the workaround to manage this issue >> manually via the control panel should go to the wiki. >> >> Anna, any suggestions? > just opened a discussion on the dev ML: > > https://lists.osgeo.org/pipermail/grass-dev/2016-November/083122.html some insights regarding %HOME% in winGRASS: https://lists.osgeo.org/pipermail/grass-dev/2016-November/083159.html -- [GRASS-dev] does GRASS need HOME to be defined? > >> anyone more insight, if %HOME% is needed in winGRASS? > > > >Done by Glynn in: > >https://trac.osgeo.org/grass/changeset/37873 > > does GRASS need HOME to be defined? > > any hints? It's used G__home() on Unix (and as a fallback on Windows) and it's used for G_rc_path() on Windows (for some reason, the Unix version uses getpwuid(), which is probably incorrect in this context). It may also be used implicitly by library functions or external programs looking for configuration files. -- https://lists.osgeo.org/pipermail/grass-stats/2016-November/001708.html -- OK, so the extension would be to look in %HOME%/Documents to see if there is %HOME%/Documents/R, and if so do what? If R_LIBS_USER is set, do nothing, if not, set R_USER, or guess which win-library is the relevant one and set R_LIBS_USER? Even if this is redundant for non-R users? -- so it's still to discuss what would be the best option to overcome this issue. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5297179.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > > Roger Bivand wrote >> For me on Linux, R_LIBS is set by me and works, but on Windows the >> default >> is (possibly) set in the Registry anyway, which would/should be used if >> R_LIBS is not set. Within R, .libPaths() should be the same inside GRASS >> and outside GRASS. In Linux I have chosen to set R_LIBS, in Windows 7, >> GRASS standalone 7.0.4, I can start R GUI in the GRASS GUI console >> command >> line, and my personal library is found (no R_LIBS set, .libPaths() >> returns >> the default). I haven't tried with GRASS 7.2 on Windows. > .libPaths() works here the same outside an inside a winGRASS session. > everything works. > > I've installed all my libraries system wide here, not to any personal > folder like Anna. > > so I'll test later by adding some libraries to a personal folder like > Anna. now tested by intalling some libraries into my personal library. outside a winGRASS7.2.svn session > .libPaths() [1] "C:/Users/test/Documents/R/win-library/3.3" [2] "C:/Program Files/R/R-3.3.1/library" > inside a winGRASS7.2.svn session > .libPaths() [1] "C:/Program Files/R/R-3.3.1/library" there is a diffference between inside and outside a winGRASS7.2.svn session - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296217.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > now tested by intalling some libraries into my personal library. > > outside a winGRASS7.2.svn session > >> .libPaths() > [1] "C:/Users/test/Documents/R/win-library/3.3" > [2] "C:/Program Files/R/R-3.3.1/library" >> > > inside a winGRASS7.2.svn session > >> .libPaths() > [1] "C:/Program Files/R/R-3.3.1/library" > > there is a diffference between inside and outside a winGRASS7.2.svn > session now tested with standalone winGRASS7.0.5; same behaviour; inside a winGRASS-session the personal library seems not to be found. any idea? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296219.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > > Helmut Kudrnovsky wrote >> now tested by intalling some libraries into my personal library. >> >> outside a winGRASS7.2.svn session >> >>> .libPaths() >> [1] "C:/Users/test/Documents/R/win-library/3.3" >> [2] "C:/Program Files/R/R-3.3.1/library" >>> >> >> inside a winGRASS7.2.svn session >> >>> .libPaths() >> [1] "C:/Program Files/R/R-3.3.1/library" >> >> there is a diffference between inside and outside a winGRASS7.2.svn >> session > now tested with standalone winGRASS7.0.5; same behaviour; inside a > winGRASS-session the personal library seems not to be found. > > any idea? now changing into the locally GRASS source code where R-batch files lives (D:\software_source\grass_trunk\mswindows\external\rbatch) and start R form there (same mechanism as implemented in the standalone winGRASS): D:\software_source\grass_trunk\mswindows\external\rbatch>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R ist freie Software und kommt OHNE JEGLICHE GARANTIE. Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten. Tippen Sie 'license()' or 'licence()' für Details dazu. R ist ein Gemeinschaftsprojekt mit vielen Beitragenden. Tippen Sie 'contributors()' für mehr Information und 'citation()', um zu erfahren, wie R oder R packages in Publikationen zitiert werden können. Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder 'help.start()' für eine HTML Browserschnittstelle zur Hilfe. Tippen Sie 'q()', um R zu verlassen. > .libPaths() [1] "C:/Users/test/Documents/R/win-library/3.3" [2] "C:/Program Files/R/R-3.3.1/library" > here R finds both, the standard and the personal library. so it seems winGRASS seems to hide the path to the personal library. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296225.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
>My Windows 7, GRASS 7.0.4 shows identical .libPaths() values both inside >and out with RGui. I don't know how the location of the personal library >folder is recorded - is it in the registry? How might one know? It looks >like: > >Sys.getenv("R_LIBS_USER") tested within a winGRASS7.0.5 session: > Sys.getenv("R_LIBS_USER") [1] "C:\\Users\\test/R/win-library/3.3" > .libPaths() [1] "C:/Program Files/R/R-3.3.1/library" R_LIBS_USER is listed there within the winGRASS session, but the path itself looks odd. outside a winGRASS7.0.5/7.2.svn session, everthing is ok with these variables (see above). - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296239.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Roger Bivand wrote > On Tue, 15 Nov 2016, Anna Petrášová wrote: > >> Hi, >> >> I installed latest R on fresh Windows 10, then I installed several >> packages into my personal library, then I installed standalone GRASS >> GIS 7.3, and when I run R from GRASS session, it does not see the >> installed packages. .libPaths() called from GRASS session indeed does >> not show the path to the personal library. I installed the packages >> again in GRASS session and then it's OK. Any idea why this happens and >> how to avoid that? > > No idea, only you can reproduce what you are doing. Do you mean 7.3, the > development version? Try the 7.0 and 7.2 versions, and compare to see > which environment variables may not be being transferred (R_LIBS probably) > in GRASS 7.3. Are you running R in a Windows terminal (if such > exists in Windows 10) inside GRASS, or in the command line in the > GRASS GUI? If the latter, has this changed? tested with winGRASS7.2.svn standalone installer System Info GRASS version: 7.2.svn GRASS SVN revision: r69794 Build date: 2016-11-13 Build platform: x86_64-w64-mingw32 GDAL: 2.1.2 PROJ.4: 4.9.3 GEOS: 3.5.0 SQLite: 3.14.1 Python: 2.7.5 wxPython: 2.8.12.1 Platform: Windows-8-6.2.9200 in the winGRASS-provided windows console: Cleaning up temporary files... Starting GRASS GIS... WARNING: Concurrent mapset locking is not supported on Windows __ ___ _____ / / __ \/ | / ___/ ___/ / / _/ ___/ / / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \ / /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ / \/_/ |_/_/ |_/// \/___/// Welcome to GRASS GIS 7.2.svn (r69794) GRASS GIS homepage: http://grass.osgeo.org This version running through:Command Shell (C:\WINDOWS\system32\cmd.exe) Help is available with the command: g.manual -i See the licence terms with: g.version -c See citation options with: g.version -x If required, restart the GUI with: g.gui wxpython When ready to quit enter:exit Launching GUI in the background, please wait... Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\test>R R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > q() Save workspace image? [y/n/c]: n C:\Users\test>echo %R_LIBS% %R_LIBS% I've implemented the R-winGRASS-connecting for the standalone installer by https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/external/rbatch https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/external/rbatch/R.bat %R_LIBS% isn't listed there. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296042.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > both changes should be discussed on the dev ML. > > before such changes are implemented, the workaround to manage this issue > manually via the control panel should go to the wiki. > > Anna, any suggestions? just opened a discussion on the dev ML: https://lists.osgeo.org/pipermail/grass-dev/2016-November/083122.html - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296481.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Roger Bivand wrote > Right. Both R and Python seem to use %USERPROFILE% which is predictably > present in modern Windows. In winGRASS this is used to set %HOME%, which R > uses instead of %USERPROFILE%. R believes a set %HOME%, leading to the > difficulties. a list of available windows variables: http://ss64.com/nt/syntax-variables.html USERPROFILE: %SystemDrive%\Users\{username} This is equivalent to the $HOME environment variable in Unix/Linux Roger Bivand wrote > Could the winGRASS startup set R_LIBS_USER itself, and free it on exit? If > the user had multiple /x.y library directories, the advice would be to set > manually in the control panel, if one, use that? theoretically it would be possible to set R_LIBS_USER during installation; a new logic has to be added to the nsis installer script. the other way around may be to set %HOME% in winGRASS as %USERPROFILE%\Documents. both changes should be discussed on the dev ML. before such changes are implemented, the workaround to manage this issue manually via the control panel should go to the wiki. Anna, any suggestions? - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296469.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Roger Bivand wrote > On Thu, 17 Nov 2016, Roger Bivand wrote: > >> On Thu, 17 Nov 2016, Helmut Kudrnovsky wrote: >> >>> > My Windows 7, GRASS 7.0.4 shows identical .libPaths() values both >>> inside >>> > and out with RGui. I don't know how the location of the personal >>> library >>> > folder is recorded - is it in the registry? How might one know? It >>> looks >>> > like: >>> > >>> > Sys.getenv("R_LIBS_USER") >>> >>> tested within a winGRASS7.0.5 session: >>> >>> > Sys.getenv("R_LIBS_USER") >>> [1] "C:\\Users\\test/R/win-library/3.3" >>> > .libPaths() >>> [1] "C:/Program Files/R/R-3.3.1/library" >>> >>> R_LIBS_USER is listed there within the winGRASS session, but the path >>> itself >>> looks odd. >> >> Unfortunately, I couldn't reproduce this with stand-alone GRASS 7.0.5 or >> 7.2, >> Windows 7 Pro, R 3.3.2. I see the same .libPaths() values inside and >> outside. >> But see below - I found out how to reproduce the problem predictably. >> >> The reason was (of course) that I'd forgotten that I had set R_LIBS_USER >> in >> Control Panel -> System and Security -> System -> Advanced system >> settings -> >> Environment Variables. I'd done this as a response to the extra work >> caused >> at each annual change of the default address as R's version was >> incremented. >> See also: >> >> https://stat.ethz.ch/R-manual/R-devel/library/base/html/libPaths.html >> >> So a workaround might to use the R_LIBS_USER environment variable in that >> setting, checking that the directory exists. R uses it internally as >> generated, but doesn't export it. I don't know how this plays >> cross-platform. > > In a context with Windows 7 without setting the R_LIBS_USER environment > variable, R outside GRASS reports: > >> Sys.getenv("HOME") > [1] "C:\\Users\\rsb\\Documents" >> .libPaths() > [1] "C:/Users/rsb/Documents/R/win-library/3.3" > [2] "C:/Program Files/R/R-3.3.2/library" > > but inside GRASS %HOME% is re-defined, so: > >> Sys.getenv("HOME") > [1] "C:\\Users\\rsb" >> .libPaths() > [1] "c:/Program Files/R/R-3.3.2/library" > > as R cannot construct: subdirectory ‘R/win-library/x.y’ of the home > directory, for R x.y.z, because "C:\\Users\\rsb/R/win-library/x.y" does > not exist, and that is where R is looking (here in GRASS): > >> Sys.getenv("R_LIBS_USER") > [1] "C:\\Users\\rsb/R/win-library/3.3" > > (the different dirseps do not matter). > > Does WinGRASS need to change the HOME environment variable? If it does, > users of R in GRASS need to set R_LIBS or R_LIBS_USER, easiest once via > Control Panel. could you download the files from https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/external/rbatch, copy these to an arbitrary folder e.g. C:\wd\testfolder, open a windows console within this folder and type R in the console, then try your test with Sys.getenv("R_LIBS_USER") and .libPaths()? for me it works that the general and private library is found by R. I'll have a look if /where winGRASS changes %HOME% - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296409.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Roger Bivand wrote >> could you download the files from >> https://trac.osgeo.org/grass/browser/grass/trunk/mswindows/external/rbatch, >> copy these to an arbitrary folder e.g. C:\wd\testfolder, open a windows >> console within this folder and type R in the console, then try your test >> with Sys.getenv("R_LIBS_USER") and .libPaths()? >> >> for me it works that the general and private library is found by R. > > OK, looks like this: > >> Sys.getenv("R_LIBS_USER") > [1] "C:\\Users\\rsb\\Documents/R/win-library/3.3" >> .libPaths() > [1] "C:/Users/rsb/Documents/R/win-library/3.3" > [2] "C:/Program Files/R/R-3.3.2/library" >> any(match(installed.packages()[,"Package"], "rgrass7")) > [1] TRUE > > But I don't see any recent revisions in that directory? it is taken from https://github.com/ggrothendieck/batchfiles by author`s permission. so the script works outside a winGRASS session also for you. but the same script doesn't work inside a winGRASS session. so it's maybe related to some %HOME% issues as mentioned before. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296444.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Helmut Kudrnovsky wrote > I had a look into the sources; I can't find a line of code where winGRASS > changes %HOME% at the moment; but it obvious uses %USERPROFILE% as %HOME%. maybe just found it: for trunk https://trac.osgeo.org/grass/browser/grass/trunk/lib/init/grass.py#L712 712 def ensure_home(): 713 """Set HOME if not set on MS Windows""" 714 if windows and not os.getenv('HOME'): 715 os.environ['HOME'] = os.path.join(os.getenv('HOMEDRIVE'), 716 os.getenv('HOMEPATH')) and for the 7.0.x-line https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/lib/init/grass.py#L1338 1338# set HOME 1339if windows and not os.getenv('HOME'): 1340os.environ['HOME'] = os.path.join(os.getenv('HOMEDRIVE'), 1341 os.getenv('HOMEPATH')) - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296458.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] GRASS can't find R packages from personal library on Windows
Roger Bivand wrote >> >> no idea at the moment if this change in env.bat has a side effect to the >> winGRASS installation; further tests are needed. >> > > See also > >> ?"environment variables" > > which on a Windows installation shows "R_USER" in the Windows specific > section at foot, this also loses /Documents within GRASS. see my other mail where %HOME% is set by winGRASS-grass7xx.py so it seems to be some kind of a "design mismatch" where eg. windows (via %USERPROFILE) and python C:\>python Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.getenv('HOME') 'C:\\Users\\hkmyr' >>> os.getenv('HOMEPATH') '\\Users\\hkmyr' >>> os.getenv('HOMEDRIVE') 'C:' >>> and R looks for %HOME%. - best regards Helmut -- View this message in context: http://osgeo-org.1560.x6.nabble.com/GRASS-can-t-find-R-packages-from-personal-library-on-Windows-tp5295771p5296461.html Sent from the Grass - Stats mailing list archive at Nabble.com. ___ grass-stats mailing list grass-stats@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for readVECT
>Are SQLite and GML drivers disabled/broken in readVECT? I only get driver="ESRI Shapefile" to work, confirmed by: --- > sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 15063) Matrix products: default locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgrass7_0.1-9 XML_3.98-1.9 sp_1.2-5 loaded via a namespace (and not attached): [1] compiler_3.4.0 rgdal_1.2-12grid_3.4.0 lattice_0.20-35 --- only driver="ESRI Shapefile" works here. trying SQLite: > bla5 <- readVECT("firestations", driver="SQLite") Supported formats: Error: driver %in% candDrivers is not TRUE - 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] rgrass7 - SQLite and GML drivers not working for readVECT
>Are SQLite and GML drivers disabled/broken in readVECT? some earlier discussions I remembered: https://lists.osgeo.org/pipermail/grass-stats/2015-July/001561.html https://lists.osgeo.org/pipermail/grass-stats/2015-July/001562.html [...] https://lists.osgeo.org/pipermail/grass-stats/2015-June/date.html - 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] rgrass7 - SQLite and GML drivers not working for readVECT
>For some vectors, I get the following warnings (loss of data apparently): > >> bla2<-readVECT("census_wake2000") >Exporting 105 areas (may take some time)... >Warning 1: Value 120426752 of field AREA of feature 23 not successfully written. Possibly due to too larger >number with respect to field width >Warning 1: Value 108540592 of field AREA of feature 24 not successfully written. Possibly due to too larger >number with respect to field width it seems to be a shapefile/(ogr) issue, see: v.out.ogr input=census_wake2000@PERMANENT output=D:\wd\test\slkdf\census_wake2000.shp format=ESRI_Shapefile Exporting 105 areas (may take some time)... Warning 1: Value 120426752 of field AREA of feature 23 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 108540592 of field AREA of feature 24 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 136831232 of field AREA of feature 26 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 133581472 of field AREA of feature 37 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 186611808 of field AREA of feature 42 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 645046656 of field AREA of feature 43 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 550580288 of field AREA of feature 44 not successfully written. Possibly due to too larger number with respect to field width - 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] rgrass7 - SQLite and GML drivers not working for readVECT
>> bla2<-readVECT("census_wake2000") >Exporting 105 areas (may take some time)... >Warning 1: Value 120426752 of field AREA of feature 23 not successfully written. Possibly due to too larger >number with respect to field width testing by: v.out.ogr input=census_wake2000@PERMANENT output=D:\wd\test\slkdf\census_wake2000.sqlite format=SQLite D:\wd\test\slkdf>ogrinfo census_wake2000.sqlite INFO: Open of `census_wake2000.sqlite' using driver `SQLite' successful. 1: census_wake2000 (Polygon) D:\wd\test\slkdf>ogr2ogr test.shp census_wake2000.sqlite Warning 1: Value 120426752 of field area of feature 23 not successfully written. Possibly due to too larger number with respect to field width Warning 1: Value 108540592 of field area of feature 24 not successfully written. Possibly due to too larger number with respect to field width the same warning as in readVect. OTOH loading the test.shp in QGIS, it seems that the area value is successfully written into the shapefile dbf attribute table. maybe worth to ask in the GDAL ML for clarification for these warnings. - 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] rgrass7 - SQLite and GML drivers not working for readVECT
>Von: "Roger Bivand">Please report sessionInfo() in R, and check the ogrDrivers() list. sessionInfo() already posted in the mail before, here again: > sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 15063) Matrix products: default locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.0 and > ogrDrivers() Error in ogrDrivers() : could not find function "ogrDrivers" ___ grass-stats mailing list grass-stats@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for readVECT
Gesendet: Dienstag, 10. Oktober 2017 um 22:52 Uhr Von: "Veronica Andreo" <veroand...@gmail.com> An: "Roger Bivand" <roger.biv...@nhh.no> Cc: "grass-stats@lists.osgeo.org" <grass-stats@lists.osgeo.org>, "Helmut Kudrnovsky" <hel...@web.de> Betreff: Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for readVECT Hello Roger, Sorry I forgot this info. Here, the outputs: > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: Fedora 26 (Twenty Six) Matrix products: default BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.1 > library(rgrass7) Loading required package: sp Loading required package: XML GRASS GIS interface loaded with GRASS version: GRASS 7.3.svn (2017) and location: nc_spm_08_grass7 > library(rgdal) rgdal: version: 1.2-13, (SVN revision 686) Geospatial Data Abstraction Library extensions to R successfully loaded Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01 Path to GDAL shared files: /usr/share/gdal Loaded PROJ.4 runtime: Rel. 4.9.3, 15 August 2016, [PJ_VERSION: 493] Path to PROJ.4 shared files: (autodetected) Linking to sp version: 1.2-5 > ogrDrivers() name long_name 1 AeronavFAA Aeronav FAA 2 AmigoCloud AmigoCloud 3 ARCGEN Arc/Info Generate 4 AVCBin Arc/Info Binary Coverage 5 AVCE00 Arc/Info E00 (ASCII) Coverage 6 BNA Atlas BNA 7 Carto Carto 8 Cloudant Cloudant / CouchDB 9 CouchDB CouchDB / GeoCouch 10 CSV Comma Separated Value (.csv) 11 CSW OGC CSW (Catalog Service for the Web) 12 DGN Microstation DGN 13 DXF AutoCAD DXF 14 EDIGEO French EDIGEO exchange format 15 ElasticSearch Elastic Search 16 ESRI Shapefile ESRI Shapefile 17 Geoconcept Geoconcept 18 GeoJSON GeoJSON 19 Geomedia Geomedia .mdb 20 GeoRSS GeoRSS 21 GFT Google Fusion Tables 22 GML Geography Markup Language (GML) 23 GPKG GeoPackage 24 GPSBabel GPSBabel 25 GPSTrackMaker GPSTrackMaker 26 GPX GPX 27 HTF Hydrographic Transfer Vector 28 HTTP HTTP Fetching Wrapper 29 Idrisi Idrisi Vector (.vct) 30 Interlis 1 Interlis 1 31 Interlis 2 Interlis 2 32 JML OpenJUMP JML 33 JP2OpenJPEG JPEG-2000 driver based on OpenJPEG library 34 JPEG2000 JPEG-2000 part 1 (ISO/IEC 15444-1), based on Jasper library 35 KML Keyhole Markup Language (KML) 36 LIBKML Keyhole Markup Language (LIBKML) 37 MapInfo File MapInfo File 38 Memory Memory 39 MSSQLSpatial Microsoft SQL Server Spatial Database 40 MySQL MySQL 41 NAS
Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for readVECT
>Von: "Roger Bivand" >And output of v.in.ogr -f? v.in.ogr -f JP2ECW (ro): ERDAS JPEG2000 (SDK 5.3) FileGDB (rw+): ESRI FileGDB PCIDSK (rw+): PCIDSK Database File netCDF (rw+): Network Common Data Format JP2OpenJPEG (rw): JPEG-2000 driver based on OpenJPEG library PDF (rw+): Geospatial PDF DB2ODBC (rw+): IBM DB2 Spatial Database ESRI Shapefile (rw+): ESRI Shapefile MapInfo File (rw+): MapInfo File UK .NTF (ro): UK .NTF OGR_SDTS (ro): SDTS S57 (rw+): IHO S-57 (ENC) DGN (rw+): Microstation DGN OGR_VRT (ro): VRT - Virtual Datasource REC (ro): EPIInfo .REC Memory (rw+): Memory BNA (rw+): Atlas BNA CSV (rw+): Comma Separated Value (.csv) NAS (ro): NAS - ALKIS GML (rw+): Geography Markup Language (GML) <= GPX (rw+): GPX LIBKML (rw+): Keyhole Markup Language (LIBKML) KML (rw+): Keyhole Markup Language (KML) GeoJSON (rw+): GeoJSON Interlis 1 (rw+): Interlis 1 Interlis 2 (rw+): Interlis 2 OGR_GMT (rw+): GMT ASCII Vectors (.gmt) GPKG (rw+): GeoPackage SQLite (rw+): SQLite / Spatialite <= ODBC (rw+): ODBC WAsP (rw+): WAsP .map format PGeo (ro): ESRI Personal GeoDatabase MSSQLSpatial (rw+): Microsoft SQL Server Spatial Database OGR_OGDI (ro): OGDI Vectors (VPF, VMAP, DCW) PostgreSQL (rw+): PostgreSQL/PostGIS MySQL (rw+): MySQL OpenFileGDB (ro): ESRI FileGDB XPlane (ro): X-Plane/Flightgear aeronautical data DXF (rw+): AutoCAD DXF CAD (ro): AutoCAD Driver Geoconcept (rw+): Geoconcept GeoRSS (rw+): GeoRSS GPSTrackMaker (rw+): GPSTrackMaker VFK (ro): Czech Cadastral Exchange Data Format PGDUMP (rw+): PostgreSQL SQL dump OSM (ro): OpenStreetMap XML and PBF GPSBabel (rw+): GPSBabel SUA (ro): Tim Newport-Peace's Special Use Airspace Format OpenAir (ro): OpenAir OGR_PDS (ro): Planetary Data Systems TABLE WFS (ro): OGC WFS (Web Feature Service) HTF (ro): Hydrographic Transfer Vector AeronavFAA (ro): Aeronav FAA Geomedia (ro): Geomedia .mdb EDIGEO (ro): French EDIGEO exchange format GFT (rw+): Google Fusion Tables SVG (ro): Scalable Vector Graphics CouchDB (rw+): CouchDB / GeoCouch Cloudant (rw+): Cloudant / CouchDB Idrisi (ro): Idrisi Vector (.vct) ARCGEN (ro): Arc/Info Generate SEGUKOOA (ro): SEG-P1 / UKOOA P1/90 SEGY (ro): SEG-Y XLS (ro): MS Excel format ODS (rw+): Open Document/ LibreOffice / OpenOffice Spreadsheet XLSX (rw+): MS Office Open XML spreadsheet ElasticSearch (rw+): Elastic Search Walk (ro): Walk Carto (rw+): Carto AmigoCloud (rw+): AmigoCloud SXF (ro): Storage and eXchange Format Selafin (rw+): Selafin JML (rw+): OpenJUMP JML PLSCENES (ro): Planet Labs Scenes API CSW (ro): OGC CSW (Catalog Service for the Web) VDV (rw+): VDV-451/VDV-452/INTREST Data Format GMLAS (rw): Geography Markup Language (GML) driven by application schemas TIGER (rw+): U.S. Census TIGER/Line AVCBin (ro): Arc/Info Binary Coverage AVCE00 (ro): Arc/Info E00 (ASCII) Coverage HTTP (ro): HTTP Fetching Wrapper Supported formats: --- both GML and SQLite there. thanks for checking. Helmut ___ grass-stats mailing list grass-stats@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for readVECT
>Gesendet: Dienstag, 10. Oktober 2017 um 23:24 Uhr >Von: "Ahmadou Dicko" <dicko.ahma...@gmail.com> >An: "Helmut Kudrnovsky" <hel...@web.de> >Cc: "Roger Bivand" <roger.biv...@nhh.no>, "grass-stats@lists.osgeo.org" ><grass-stats@lists.osgeo.org> >Betreff: Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not working for >readVECT > >Hi everyone, > >I think that using v.external -f (instead of v.in.ogr -f) can fix this issue >(didn't try yet) > > >execGRASS("v.external", flags = "f", intern = TRUE) > [1] "ARCGEN" "AVCBin" "AVCE00" > [4] "AeronavFAA" "AmigoCloud" "BNA" > [7] "CAD" "CSV" "CSW" >[10] "Carto" "Cloudant" "CouchDB" >[13] "DGN" "DXF" "EDIGEO" >[16] "ESRI_Shapefile" "ElasticSearch" "GFT" >[19] "GML" "GPKG" "GPSBabel" >[22] "GPSTrackMaker" "GPX" "GeoJSON" >[25] "GeoRSS" "Geoconcept" "Geomedia" >[28] "HTF" "HTTP" "Idrisi" >[31] "JML" "JPEG2000" "KML" >[34] "MSSQLSpatial" "MapInfo_File" "Memory" >[37] "MySQL" "ODBC" "ODS" >[40] "OGR_GMT" "OGR_GRASS" "OGR_PDS" >[43] "OGR_SDTS" "OGR_VRT" "OSM" >[46] "OpenAir" "OpenFileGDB" "PCIDSK" >[49] "PDF" "PGDUMP" "PGeo" >[52] "PLSCENES" "PostgreSQL" "REC" in a quick check, there is no difference in available formats. ___ grass-stats mailing list grass-stats@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-stats
Re: [GRASS-stats] R and GRASS on Windows - Status 1
Maximilian Bakenhus wrote > Hello all, > > nearly any GRASS command which I write gives me Errors like: > > 1: running command 'r.to.vect.exe --quiet --overwrite input=sites_catchm_1 > output=sites_catchm_1_v type=area' had status 1 > > 2: running command 'v.overlay.exe --overwrite --quiet > ainput=veg_01_sa_31467.shp binput=sites_catchm_1_v operator=and > output=veg_01_sa_31467.shp_1 olayer=1,0,0' had status 1 > > 3: running command 'v.db.addcolumn.bat map=veg_01_sa_31467.shp_1 > columns="area double precision"' had status 1 > > I guess this is because of wrong permissions ? > How can I get along with that ? (1) which R version? (2) which GRASS version? standalone wingrass or OSGeo4W wingrass? (3) how is the exact command in R? - 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] R and GRASS on Windows - Status 1
--- (1)‘3.4.2’of R, Version 1.1.383 of R Studio (2) GRASS Standalone (3) a <- NULL for(i in 1:length(anames)){ print(anames[i]) a <- c(a,unique(execGRASS("v.db.select", parameters = list( map = anames[i], columns = "objart" ), intern = T)[-1])) } Warning messages: 1: running command 'v.db.select.exe map=veg_01_sa_31467.shp columns=objart' had status 1 For any GRASS related command I get a similar error. you have to keep it on the mailing list, otherwise no one is able to answer. - 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] rgrass7 - SQLite and GML drivers not working for readVECT
>Please try: > >install.packages("rgrass7", repos="http://R-Forge.R-project.org;) > >which incorporates the change in both places, not just one as before (svn >revision 63 on R-Forge, spgrass project). tested with above install.packages cmd: > sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 15063) Matrix products: default locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgrass7_0.1-11 XML_3.98-1.9 sp_1.2-5 loaded via a namespace (and not attached): [1] compiler_3.4.0 grid_3.4.0 lattice_0.20-35 > it works here on winGRASS. - 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 trying to start GRASS from Rstudio in Windows
Veronica Andreo wrote > Hi > > I taught a GRASS course last week and all students got the same error when > trying to init GRASS from R or Rstudio (in all cases grass was installed > through OSGeo4W installer). > > Here´s the command we used (paths must be adapted accordingly): > > initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.2RC2", > gisDbase = "C:/Users/RETA/Documents/grassdata", > location = "nc_spm_08_grass7", > mapset = "user1", > SG = "elevation") > > The pop-up error is a missing iconv.dll. See screenshot attached. I > believe > all locales were in Spanish as well as the laptop I am testing now. After > many attempts to try to close the pop-up error, we got the following in > the > Rstudio console: > > Error in if (!compatible) { : argument is of length zeroIn addition: > Warning messages:1: In system(paste("g.dirseps.exe -g", > shQuote(Sys.getenv("GISRC"))), : running command 'g.dirseps.exe -g > "junk"' had status 3092: In system(paste("g.dirseps.exe -g", > shQuote(gisDbase)), intern = TRUE) : running command 'g.dirseps.exe > -g "C:/Users/RETA/Documents/grassdata"' had status 3093: 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), : > running command 'g.version.exe' had status 309 > > Is this grass or windows problem? I did not get this error in this same > laptop a month ago when Roger fixed some other problems. Seems that > something changed meanwhile. tested here now with System Info GRASS version: 7.4.2 GRASS SVN revision: r73591 Build date: 2018-10-23 Build platform: x86_64-w64-mingw32 GDAL: 2.3.2 PROJ.4: 5.2.0 GEOS: 3.7.0 SQLite: 3.17.0 Python: 2.7.14 wxPython: 2.8.12.1 Platform: Windows-10-10.0.17134 (OSGeo4W) - > sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17134) Matrix products: default l [1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252 LC_MONETARY=German_Austria.1252 LC_NUMERIC=C LC_TIME=German_Austria.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgrass7_0.1-10 XML_3.98-1.11 sp_1.3-1 loaded via a namespace (and not attached): [1] compiler_3.4.4 grid_3.4.4 lattice_0.20-35 - confirmed, also here a iconv.dll-issue (missing iconv.dll); and also confirmed that it worked a month or so ago. closer look at the error message and the used dependencies: winGRASS 7.4.2 is now compiled against GDAL: 2.3.2 and PROJ.4: 5.2.0 when I tried a month or so ago, winGRASS was compiled against GDAL 2.0.X (or similar) and PROJ.4 4.9. (or similar). it seems there could be a dll mismatch between old and new dependencies versions; hence the iconv.dll issue. - 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 trying to start GRASS from Rstudio in Windows
>I got the same error a while back and I ended up finding a workaround by copying all of the .dll files from >C:\OSGeo4W64\bin to C:\OSGeo4W64\apps\grass\grass-7.4.1\bin. I have grass installed on my C drive >but follow the path to your installation path bin. It appears that the .dlls are different or incompatible. yes, it is a dll mismatch. please report this in the GRASS ML, or better open a ticket about this in the bugtracker - 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 trying to start GRASS from Rstudio in Windows
Markus Neteler wrote > On Thu, Nov 1, 2018 at 1:20 PM Veronica Andreo > veroandreo@ > wrote: >> In the body of the ticket I mentioned that the "pop-up error is a missing >> iconv.dll" and > > Yes - but the real error message might help. see https://lists.osgeo.org/pipermail/grass-dev/2018-November/090433.html for the solution: "starting R/RGUi/RStudio from the OSGeo4W-console, then it works." - 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)
>How to find/test for the location of PROJ shared files? see https://r-forge.r-project.org/scm/viewvc.php/pkg/rgrass7/R/initGRASS.R?root=spgrass=55=64 for a diff - 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)
>I could reproduce the problem after starting the OSGeo4W console from the >desktop shortcut icon. > >The problem seems to be that OSGeo4W's console starts in a directory for >which the user does not have write access (for me from a desktop shortcut >C:\Users\Public\Desktop\OSGeo4W). Because rgrass7::initGRASS() needs to >write a GISRC file in the working directory, it needs write access. When I >changed working directory to one to which I did have write access, the >current CRAN binary rgrass7 loaded correctly under OSGeo4W for a >throw-away location. I haven't yet tried with a pre-existing location. > >Could you check and see whether this seems reasonable? > >If so, I'll add a check for write access in the working directory to give >a more sensible error message. tested here with an existing location while changed the working directory to writable directory: -- run o-help for a list of available commands C:\>d: D:\>cd temp D:\temp>cd testR D:\temp\testR>R R version 3.4.4 (2018-03-15) -- "Someone to Lean On" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R ist freie Software und kommt OHNE JEGLICHE GARANTIE. Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten. Tippen Sie 'license()' or 'licence()' für Details dazu. R ist ein Gemeinschaftsprojekt mit vielen Beitragenden. Tippen Sie 'contributors()' für mehr Information und 'citation()', um zu erfahren, wie R oder R packages in Publikationen zitiert werden können. Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder 'help.start()' für eine HTML Browserschnittstelle zur Hilfe. Tippen Sie 'q()', um R zu verlassen. > library(rgrass7) Lade nötiges Paket: sp Lade nötiges Paket: XML GRASS GIS interface loaded with GRASS version: (GRASS not running) > initGRASS(gisBase = "C:/OSGeo4W64/apps/grass/grass-7.4.1", + gisDbase = "D:/grassdata/", location = "nc_spm_08_grass7", + mapset = "user1", SG="elevation") gisdbaseD:/grassdata/ locationnc_spm_08_grass7 mapset user1 rows474 columns 526 north 228527.2 south 215018.2 west629980 east644971 nsres 28.5 ewres 28.5 projection +proj=lcc +lat_1=36.16 +lat_2=34.34 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1 Warnmeldung: In dir.create(gisDbase) : 'D:\grassdata' existiert bereits > g <- gmeta() > g gisdbaseD:/grassdata/ locationnc_spm_08_grass7 mapset user1 rows474 columns 526 north 228527.2 south 215018.2 west629980 east644971 nsres 28.5 ewres 28.5 projection +proj=lcc +lat_1=36.16 +lat_2=34.34 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000 +to_meter=1 > - yes, the issue is that OSGeo4W's console starts in a directory for which the user does not have write access. changing to a directory with write access starting grass from R works as expected. I'll change the wiki accordingly. >If so, I'll add a check for write access in the working directory to give >a more sensible error message. that would be helpful. - 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)
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)
>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)
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
Re: [GRASS-stats] Error when starting grass from R (grass installed thru osgeo4w)
>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] Package rgrass7 - g.extension function
romain Fer. wrote > Hello, > > I am a french student in master's degrees, in advence I'm sorry for my > english. > > I using the package rgrass7 with R during my internship and I have a error > on one function of this package. I use g.extension to import r.clip. I > explain this error on this forum : > https://gis.stackexchange.com/questions/360310/install-grass-extension-with-g-extension-and-rstudio > > Can you look my explications of this problem and do you give me your > opinion on this error ? > > Thanks you in advance for your help, there are maybe several issues here: >initGRASS("C:/Program Files/GRASS GIS 7.6" is it possible to upgrade to the 7.8.x-line? >libgis_revison = grass.version()['libgis_revision'] >KeyError: 'libgis_revision' AFAIR there have been some issues with libgis_revision in earlier versions; this should be addressed in 7.8.x-line. >ATTENTION: GRASS_ADDON_BASE is not defined this variable should be defined that the addon is installed in the correst place. when you use winGRASS out of RStudio, are there all needed variables defined? see https://github.com/OSGeo/grass/blob/master/mswindows/env.bat for hints which variables should be defined in minimum that standalone winGRASS is working. %GISBASE% is the installation path to standalone winGRASS. - 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