[R] trouble with maps

Ray Brownrigg ray at mcs.vuw.ac.nz
Thu Jul 24 04:21:19 CEST 2003


Roger.Bivand at nhh.no wrote:
> On Wed, 23 Jul 2003, Deborah Swayne wrote:
> 
> > Has anyone else seen this behavior from the "maps" package?
> >     
> > map('state', fill=TRUE)
> > 
> > results in a lively mix of overlapping polygons inside a
> > map of the US, but they have no obvious relationship to
> > state boundaries.  (See attached jpeg.)
> 
Ah, this was a 'known problem' :-) first noticed in January this year,
by Ott Toomet <otoomet at econ.dk>.

I suspect it is a feature of the port to R which never worked
properly.  The solution is to reverse the sign of every line number
making up the polygons in the .gon file (or alternately, reverse the
order of the line numbers there).

A 'fixed' maps package (Unix only) is available at:
ftp://ftp.mcs.vuw.ac.nz/pub/statistics/map/maps_1.1-2.tar.gz

Ray Brownrigg




More information about the R-help mailing list