[GRASS5] [bug #1784] (grass) grass_r_interface.html corrections

Request Tracker grass-bugs at intevation.de
Mon Apr 7 04:16:34 EDT 2003

this bug's URL: http://intevation.de/rt/webrt?serial_num=1784

Subject: grass_r_interface.html corrections

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: 5.0.0+

I found the following problems in grass_r_interface.html ... have fun


--- grass_r_interface.html.OLD	Mon Apr  7 18:40:13 2003
+++ grass_r_interface.html	Mon Apr  7 20:05:23 2003
@@ -209,7 +209,8 @@
 <p>After loading a map, first we can test if any NA raster cells are present
-in the map (example: slope map):
+in the map (example: slope map <a href="#genSlope">from below</a>):<BR>
 <div class="code"><pre>
 slope <- rast.get(G, rlist="slope")
@@ -242,15 +243,15 @@
 "landcov" map from GRASS:
 <div class="code"><pre>
 landcov <- rast.get(G, rlist="landcov")
+landcov.nas <- which(is.na(landcov$landcov))
+mylandcov <- landcov$landcov[!is.na(landcov$landcov)]
-Now further statistical analysis could be done.
-<p>Storing back the NAs is a three step procedure:<br>
-1. Create new empty numeric vector:
+Now further statistical analysis can be done.
+<p>Restoring the NAs is a three step procedure:<br>
+1. Create a new empty numeric vector:
 <div class="code"><pre>
 new.myslope <- numeric(length(slope$slope))
@@ -272,7 +273,7 @@
 plot(G, slope$slope)
-A mathematical is is a simple subtraction:
+A mathematical check is a simple subtraction:
 <div class="code"><pre>
 summary(slope$slope - new.myslope)
@@ -280,13 +281,12 @@
 The result should be "0" for Min, Median and Max.
 <p>Dealing with legends
-<p>Drawing a legend needs some work: Generate levels,
-analyse topo range for useful breaks:
+<p>Drawing a legend requires some work:<BR>
+Generate levels, analyse topo range for useful breaks:
 <div class="code"><pre>
 truehist(leics$topo, nbins=100)
-legendlevels <- as.ordered(cut(leics$topo, breaks=c(50,100,150,
-200, 250)))
+legendlevels <- as.ordered(cut(leics$topo, breaks=c(50,100,150,200, 250)))
 plot(G, leics$topo, col=terrain.colors(20))
 legend(x=c(452000,456000), y=c(316000,320000), pch=c(1:5),
@@ -298,8 +298,8 @@
-Another example with "leics" (the system() function
-allows to call external commands):
+Another example with "leics" (the <tt>system()</tt> function
+allows calls to external commands):
 <div class="code"><pre>
 system("g.list rast")
@@ -309,6 +309,7 @@
+<a name="genSlope">
 Calculate slope/aspect directly in GRASS:
 <div class="code"><pre>
 system("r.slope.aspect el=topo as=aspect sl=slope")

-------------------------------------------- Managed by Request Tracker

More information about the grass-dev mailing list