Helmut Kudrnovsky wrote > > 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.
tested here within a winGRASS session: D:\software_source\grass_trunk\mswindows\external\rbatch>set R_USER=C:\Users\hkmyr\Documents 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/hkmyr/Documents/R/win-library/3.3" [2] "C:/Program Files/R/R-3.3.1/library" ------------------ 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? ----- 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-tp5295771p5297192.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