Tord Snäll wrote:
Hi,
I would like to plot a map of US counties using different colors. map()
seems to be the function to use, e.g.
library(maps); map('usa'); map('county', 'colorado', add=T,fill = T,
col=c(1:5))
plots Colorado counties using colours 1 to 5.
However, I want each color
Hi,
I would like to plot a map of US counties using different colors. map()
seems to be the function to use, e.g.
library(maps); map('usa'); map('county', 'colorado', add=T,fill = T,
col=c(1:5))
plots Colorado counties using colours 1 to 5.
However, I want each color to represent a certain
-0361
- Original Message
From: Tord Snäll [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Sent: Wednesday, December 27, 2006 5:12:04 AM
Subject: [R] counties in different colours using map()
Hi,
I would like to plot a map of US counties using different colors. map()
seems
The following example shows how to get/display the county names:
library(maps)
# Get County Data
m - map('county', 'colorado', plot=FALSE)
names(m)
m$names # State,County names
# The names appear to be in alphabetical order by state, e.g.:
m$names[1:3]
[1] colorado,adamscolorado,alamosa