Geoscience Reference
In-Depth Information
TABLE 17.2
Formatted ANOVA Output
Df
Sum Sq
Mean Sq
F value
Pr(> F)
Group
1
0.69
0.69
1.42
0.2490
Residuals
18
8.73
0.48
Thus, this document contains information about the data (via assignments to the variables ctl ,
trt , Group and Weight ) as well as the steps used to analyse the data. If this document is passed
to a third party, they will be able to reproduce the analysis precisely, by applying the Sweave
program. Also, by using a further program Stangle , they will be able to extract the R code - an
example of output from this program is given in Appendix 17B.
17.3.2 g eograPhical e xaMPle : c horoPleth M aPPing
The previous example demonstrates the general principle of Sweave but does not involve
geographical data. The choropleth map in Figure 17.1 shows median annual household income per-
county data obtained from the 1990 US Census, for the US state of Georgia. It is produced using
the R helper functions choropleth , auto.shading , quantile.cuts and choro.legend
Median household income (Georgia counties)
Income $1000's
under 18
18-19
19-21
21-22
22-25
25-28
over 28
FIGURE 17.1
Incorporated R code producing graphical output - choropleth map. (From 1990 US Census.)
 
Search WWH ::




Custom Search