[GRASS-SVN] r53255 - grass-addons/grass6/raster/r.connectivity.network
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 21 00:28:36 PDT 2012
Author: sbl
Date: 2012-09-21 00:28:35 -0700 (Fri, 21 Sep 2012)
New Revision: 53255
Modified:
grass-addons/grass6/raster/r.connectivity.network/description.html
grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network
Log:
More bugfixes for r.connectivity.network
Modified: grass-addons/grass6/raster/r.connectivity.network/description.html
===================================================================
--- grass-addons/grass6/raster/r.connectivity.network/description.html 2012-09-21 06:08:28 UTC (rev 53254)
+++ grass-addons/grass6/raster/r.connectivity.network/description.html 2012-09-21 07:28:35 UTC (rev 53255)
@@ -20,7 +20,7 @@
</dl>
<h2>REQUIREMENTS</h2>
-For running this tool R language and environment for statistical computing and graphics has to be installed (see: <a href=http://www.r-project.org>http://www.r-project.org</a>). Furthermore the <a href=http://cran.r-project.org/web/packages/igraph/index.html>igraph</a> package in R is required with version 0.6-2 or newer. For parallel processing (at the moment only supported for Linux) the R packages <a href=http://cran.r-project.org/web/packages/doMC/index.html>doMC</a>, <a href=http://cran.r-project.org/web/packages/multicore/index.html>multicore</a>, <a href=http://cran.r-project.org/web/packages/iterators/index.html>iterators</a>, <a href=http://cran.r-project.org/web/packages/codetools/index.html>codetools</a> and <a href=http://cran.r-project.org/web/packages/foreach/index.html>foreach</a> are required as well. All R packages can be installed by running the AddOn using the <em><b>i-flag (-i)</b></em>. Installation requires internet access. For postscript output (overvi
ew and kernel plot) also <a href=http://www.ghostscript.com/>ghostscript</a> is required.
+For running this tool R language and environment for statistical computing and graphics has to be installed (see: <a href=http://www.r-project.org>http://www.r-project.org</a>). On Windows the path to R has to be added to the %path% variable in the environment settings (see: <a href=http://grass.osgeo.org/wiki/R_statistics#MS_Windows>http://grass.osgeo.org/wiki/R_statistics#MS_Windows</a>) and GRASS GIS has to be started after that.<br>Furthermore the <a href=http://cran.r-project.org/web/packages/igraph/index.html>igraph</a> package in R is required with version 0.6-2 or newer.<br>For parallel processing (at the moment only supported for Linux) the R packages <a href=http://cran.r-project.org/web/packages/doMC/index.html>doMC</a>, <a href=http://cran.r-project.org/web/packages/multicore/index.html>multicore</a>, <a href=http://cran.r-project.org/web/packages/iterators/index.html>iterators</a>, <a href=http://cran.r-project.org/web/packages/codetools/index.html>codetools</a>
and <a href=http://cran.r-project.org/web/packages/foreach/index.html>foreach</a> are required as well.<br>All R packages can be installed by running the AddOn using the <em><b>i-flag (-i)</b></em>. Installation of R packages requires internet access.<br>For postscript output (overview and kernel plot) also <a href=http://www.ghostscript.com/>ghostscript</a> is required.
<h2>OUTPUT NOTES</h2>
<h3>Field naming</h3>
Modified: grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network
===================================================================
--- grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network 2012-09-21 06:08:28 UTC (rev 53254)
+++ grass-addons/grass6/raster/r.connectivity.network/r.connectivity.network 2012-09-21 07:28:35 UTC (rev 53255)
@@ -268,7 +268,7 @@
if [ ! -x "`which R`" ] ; then
if [ "$OS_type" = "Win" ] ; then
g.message -e "R is required, but can not be found on the system."
- g.message -e "Please install R, or - if it is allready installed - please add the path to R to your environment variables (see: http://grass.osgeo.org/wiki/R_statistics#MS_Windows)."
+ g.message -e "Please make sure that R is installed and the path to R is added to the environment variables (see: http://grass.osgeo.org/wiki/R_statistics#MS_Windows). After that a restart of GRASS GIS is required."
exit 1
else
g.message -e "R is required, please install R first"
@@ -361,9 +361,11 @@
if [ -n "$missing_packages" ] ; then
if [ $I_FLAG -eq 1 ] ; then
if [ $OS_type = "Win" ] ; then
- echo $missing_packages | awk '{print "install.packages(\"" $2 "\")"}' | R --no-save --no-restore --ess
+ R_INSTALL_CMD=$(echo $missing_packages | sed "s/missing /missing#/g" | sed "s/.$//" | tr '#' '\n' | awk '{print "install.packages(\"" $2 "\")"}')
+ echo "{ $R_INSTALL_CMD }" | tr ' ' '\n' | R --no-save --no-restore --ess
else
- echo $missing_packages | awk '{print "install.packages(\"" $2 "\")"}' | R --no-save --no-restore --interactive
+ R_INSTALL_CMD=$(echo $missing_packages | sed "s/missing /missing#/g" | sed "s/.$//" | tr '#' '\n' | awk '{print "install.packages(\"" $2 "\")"}')
+ echo "{ $R_INSTALL_CMD }" | tr ' ' '\n' | awk '{print "install.packages(\"" $2 "\")"}' | R --no-save --no-restore --interactive
fi
else
g.message -e "${missing_packages}"
More information about the grass-commit
mailing list