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

2007-03-16 Thread Ray Brownrigg
usstata wrote:
> 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 ?
> 
nobody
> 
> 
> a rookie
> 
Tell us who you are, and you may get a more substantial reply.

Ray Brownrigg

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


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

2007-03-16 Thread usstata

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.