[R] How can i do the same thing in the China map?

usstata usstata at 126.com
Fri Mar 16 09:56:36 CET 2007


The "maps" package has a function called "match.map", which is for map coloring .
Its example is followed:

# filled map showing Republican vote in 1900
# (figure 6 in the reference)
data(state, package = "datasets")
data(votes.repub)
state.to.map <- match.map("state", state.name)
x <- votes.repub[state.to.map, "1900"]
gray.colors <- function(n) gray(rev(0:(n - 1))/n)
color <- gray.colors(100)[floor(x)]
map("state", fill = TRUE, col = color); map("state", add = TRUE)

I want to do the same thing in the China map, but I can't find the Provinces name of China.
Who can help me ?


____________________
a rookie



More information about the R-help mailing list