[R] map of china without regions

Roger Bivand Roger.Bivand at nhh.no
Fri Apr 17 13:13:21 CEST 2009


Ray Brownrigg <Ray.Brownrigg <at> ecs.vuw.ac.nz> writes:

> 
> Sorry, can't be done at the moment with the maps package.
> 
...
> 
> You *might* be able to achieve what you want by selecting only those line
segments that 
> provide portions of the external border, but I would suggest that other
packages (perhaps 
> someone will suggest the best) are more likely to be able to provide what you
want 
> without so much effort.

You could subset from the mapdata worldHires dataset:

map("worldHires","china",fill=TRUE, col="transparent")

or alternatively for a similar geographical footprint: 

library(maptools)
data(wrld_simpl)
plot(wrld_simpl[wrld_simpl$ISO2 %in% c("CN", "TW"),])

depending on your needs.

Roger Bivand

> 
> HTH
> Ray Brownrigg
> 
> On Fri, 17 Apr 2009, Cuvelier Etienne wrote:
> > Hello,
> > I use the map package in conjunction with the mapdata package,
> > and I want to draw the map of China without  interior regions.




More information about the R-help mailing list