[GRASS-stats] GRASS can't find R packages from personal library on Windows

Roger Bivand Roger.Bivand at nhh.no
Fri Nov 18 04:48:28 PST 2016


On Fri, 18 Nov 2016, Helmut Kudrnovsky wrote:

> 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%.
>

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.

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?

Roger

>
>
>
> -----
> 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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412


More information about the grass-stats mailing list