[R] map("state" ...) Is the USA cracking up?

John P. Burkett burkett at uri.edu
Fri Aug 15 22:26:51 CEST 2008


The problem was solved by specifying resolution=0 in the map() function.
Would that saving the union had always been so easy and bloodless.
-John

John P. Burkett wrote:
> Running R version 2.6.1 under Linux, I'm trying to use the maps and 
> mapdata packages and the state database to produce a thematic map of the 
> USA.  My problem is that cracks (white spaces) appear between some 
> states--e.g. between Colorado and Utah and between Michigan and Indiana. 
> The resulting visual impression is that the country is breaking up. This 
> occurs in all the projections I have tried: albers, mercator, 
> sinusoidal.  An example of a command producing this effect is the 
> following:
> map("state", regions=names48, projection="albers", par=c(36, 53), 
> fill=T, col=rgb(red, green, blue, maxColorValue=255))
> Suggests for filling the cracks would be very welcome.
> -John
> 


-- 
John P. Burkett
Department of Environmental and Natural Resource Economics
and Department of Economics
University of Rhode Island
Kingston, RI 02881-0808
USA

phone (401) 874-9195



More information about the R-help mailing list