This is version 3 of the maps package. The main change with respect to v2 is a more recent world map. The old map legacy map is still available from the package mapdata.
The new 'world' database has a higher resolution than before and looks much smoother. In fact, for some applications it may now suffice rather than needing to import worldHires.
Most functions now use perl-style regular expressions internally, rather than the default style. This gives more flexibility.
v3.1 includes support for 'SpatialPolygons' and 'SpatialLines' classes. Such objects can now either be passed to map() directly or first be converted to a map-type list with the new functions 'SpatialPolygons2map()' and 'SpatialLines2map'. These functions do not copy all the information present in the original data: only polygon names and co-ordinates are preserved (additional information like holes, plotting order etc. is ignored).
A new databse 'lakes' has been added. The standard 'world' map no longer contains any lakes.
A data frame iso3166 has been added which, for every country on the new world map, lists the official name, the ISO3166 2- and 3-letter codes, and also the sovereignty. Type '?iso3166' for details.
A set of simple functions use this iso3166 table for creating a list of countries to map. So you can use the 2- or 3-letter ISO code (e.g. as country labels on a map), but also create a list based on the sovereignty. Type '?iso.expand' for details.
v3.2 adds new options to map() for wrapping and exact boundary clipping.
map(..., exact=FALSE)
map.text(..., exact=TRUE, add=TRUE)
The old map data set has been moved to the 'mapdata' package, where it is called "worldLores". It can thus be called via map("mapdata::worldLores").
Note that the worldHires database from the mapdata package has identical map naming than the legacy world map. The only difference is in the resolution of the polylines. That high resolution version of the legacy map will remain unchanged.
Please inform the maintainer of any problem that requires a fallback to the legacy database!
Natural Earth also supports a high-resolution (1:10m) world map. Rather than replacing 'worldHires' (in the mapdata package), this data set can be imported into maps e.g. by loading the "rnaturalearth" package.
Even maps in e.g. shapefile format can now easily be imported for use in 'map()'. For instance the package 'maptools' offers the function 'readShapePoly()', which reads a shapefile into a 'SpatialPolygonsDataFrame' that can be used as a map database (as of version 3.1).
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.