[GRASS-stats] GRASS GIS 7.0 (stable) and R integration issue

Helmut Kudrnovsky hellik at web.de
Tue Oct 4 13:18:48 PDT 2016


[also here: you have to be subscribed to be able to post on this ML ]


andy-1 at ukr.net wrote
> Dear ALL
> 
> I installed new GRASS GIS 7.0 (stable) and R (last versions + all packages
> were updated).  
> Then started R (also tried Rstudio) from GRASS  as it is recommended here:
> 
> https://grasswiki.osgeo.org/wiki/R_statistics/rgrass7
> 
> R started, but when I tried to load libraries I got the following error
> and nothing works:
> 
> -------------
>> library(rgrass7)
> Loading required package: sp
> Loading required package: XML
> 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’
>> library(rgdal)
> rgdal: version: 1.1-10, (SVN revision 622)
> Geospatial Data Abstraction Library extensions to R successfully loaded
> Loaded GDAL runtime: GDAL 2.0.1, released 2015/09/15
> Path to GDAL shared files: C:/Users/Andriy/R/win-library/3.3/rgdal/gdal
> Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
> Path to PROJ.4 shared files: C:/Users/Andriy/R/win-library/3.3/rgdal/proj
> Linking to sp version: 1.2-3
>> G <- gmeta()
> Error: could not find function "gmeta"
> -----------
> 
> However if I just start R alone (not from GRASS) the packages are loaded
> normally  without errors (of course if I start R not from Grass I can't
> use Grass data).
> 
> I tried older versions: Grass 6.4.2 works with R fine, but not  GRASS 7.
> Tried on 3 different PCs. Same problem.
> 
> Could you please help to fix it?
> 
> 
> Thank you.
> Andrew

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/GRASS-GIS-7-0-stable-and-R-integration-issue-tp5281770p5289300.html
Sent from the Grass - Stats mailing list archive at Nabble.com.


More information about the grass-stats mailing list