On Fri, 18 Nov 2016, Helmut Kudrnovsky wrote:

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
1339    if windows and not os.getenv('HOME'):
1340        os.environ['HOME'] = os.path.join(os.getenv('HOMEDRIVE'),
1341                                          os.getenv('HOMEPATH'))



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?

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

--
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.biv...@nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412
_______________________________________________
grass-stats mailing list
grass-stats@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-stats

Reply via email to