
i
i
“K23166” — 2015/1/28 — 9:35 — page 192 — #218
i
i
i
i
i
i
192 CHAPTER 12. CASE STUDIES
> # read county names
> countynames =
read.table("http://www.amherst.edu/~nhorton/r2/datasets/co25_d00a.dat",
header=FALSE)
> names(countynames) = c("county", "countyname")
12.3 Plotting maps
12.3.1 Massachusetts counties, continued
We’re ready to plot the Massachusetts counties and annotate the plot with the names of
the counties.
To make the map, we begin by determining the plotting region, creating the plot of
boundaries, then adding the county names at the internal point that was provided. Since
the first set of points is in the interior of the county, these are not included ...